Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

acc 计算错误 #14

Open
wenfengzCN opened this issue Sep 12, 2018 · 0 comments
Open

acc 计算错误 #14

wenfengzCN opened this issue Sep 12, 2018 · 0 comments

Comments

@wenfengzCN
Copy link

文件:05-Recurrent Neural Network/recurrent_network.py
例如:line 86
if i % 300 == 0:
print('[{}/{}] Loss: {:.6f}, Acc: {:.6f}'.format(
epoch + 1, num_epoches, running_loss / (batch_size * i),
running_acc / (batch_size * i)))
错误值:running_loss / (batch_size*i) 等于零
原因: running_loss 为int类型
解决方法: running_loss.double()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant