更新时间:2023-12-01 22:28:28
您可能正试图从'tanh'
获取大数字,而'tanh'
仅输出-1和1之间的数字.
You're probably trying to get big numbers from a 'tanh'
, which only outputs between -1 and 1.
例如,您不能使用tanh
达到10.
You can't reach 10 with tanh
, for instance.
要么用'linear'
替换最终激活(输出任何内容),要么将输出数据标准化为-1和1之内.
Either you replace the final activation with 'linear'
(outputs anything), or you normalize your output data to be within -1 and 1.
如果数据始终为正,则可以尝试使用'softplus'
而不是'linear'
;如果选择对数据进行规范化,则将其设置为0到1之间并使用'sigmoid'
.
If your data is always positive, you can try using 'softplus'
instead of 'linear'
, and if you opt for normalizing data, make it between 0 and 1 and use 'sigmoid'
.