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

iteritems错误 #1

Open
YIKAILucas opened this issue Apr 3, 2018 · 5 comments
Open

iteritems错误 #1

YIKAILucas opened this issue Apr 3, 2018 · 5 comments

Comments

@YIKAILucas
Copy link

File "main.py", line 171, in
fire.Fire()
File "/home/thinkjoy/anaconda3/lib/python3.6/site-packages/fire/core.py", line 127, in Fire
component_trace = _Fire(component, args, context, name)
File "/home/thinkjoy/anaconda3/lib/python3.6/site-packages/fire/core.py", line 366, in _Fire
component, remaining_args)
File "/home/thinkjoy/anaconda3/lib/python3.6/site-packages/fire/core.py", line 542, in _CallCallable
result = fn(*varargs, **kwargs)
File "main.py", line 49, in train
opt.parse(kwargs)
File "/home/thinkjoy/PycharmProjects/pytorch-best-practice/config.py", line 30, in parse
for k,v in kwargs.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'

@chenyuntc
Copy link
Owner

当初用python2写的, python3 请使用

https://github.com/chenyuntc/pytorch-book/tree/master/chapter6-实战指南

@xxllp
Copy link

xxllp commented Apr 12, 2018

都能show 下最后的模型最好了。

@chenyuntc
Copy link
Owner

模型太大了。 好几百M

@alyato
Copy link

alyato commented Jun 21, 2018

@chenyuntc
第一次用pytorch,有点问题。
看了example中的mnist.py
发现用到了训练集和测试集。
而你在一篇文章说的,训练集在划分为训练集和验证集,验证集上调节参数。
可是在mnist.py 没有看到训练集的划分。
就是有点不解。
请问一下,没有验证集也可以么?可是如果没有验证集,怎么调节模型的参数呀。
谢谢。

@chenyuntc
Copy link
Owner

啊? 在训练集上调整参数, 在验证集上评估模型的表现。验证集也可以用来调整超参数比如学习率,weight_decay等

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

4 participants