You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8 lines
469 B
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

nn.BCEWithLogitsLoss()和nn.CrossEntropyLoss()最后一层都不需要激活函数这两个函数中都带有激活函数的计算softmax函数如果被执行两次可能会数据溢出精度
样本需要先归一化特别是sigmoid输出时否者也会溢出反正会出问题
增加中间的神经元数量可以提高效果1%到2%的提升
使用nn.BCEWithLogitsLoss()函数时计算每一次训练的准确度需要手动sigmoid一次