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

some matter occurs when run the evaluate #1

Open
GL123456 opened this issue Aug 30, 2020 · 6 comments
Open

some matter occurs when run the evaluate #1

GL123456 opened this issue Aug 30, 2020 · 6 comments

Comments

@GL123456
Copy link

(SREPS) F:\SREPS-master\SREPS-master>python main.py --mode=eval --dev_file=F\filmtrust\dev --save_path=model\model.npz
Traceback (most recent call last):
File "main.py", line 59, in
res = model.eval([dev_data])
File "F:\SREPS-master\SREPS-master\model.py", line 234, in eval
for name, dataset in evals:
TypeError: 'Dataset' object is not iterable

@GL123456
Copy link
Author

(SREPS) F:\SREPS-master\SREPS-master>python main.py --mode=eval --dev_file=F\filmtrust\dev --save_path=model\model.npz
Traceback (most recent call last):
File "main.py", line 59, in
res = model.eval([dev_data])
File "F:\SREPS-master\SREPS-master\model.py", line 234, in eval
for name, dataset in evals:
TypeError: 'Dataset' object is not iterable

How do I modify it to make it work?Hope to get your help! Thanks

@WSPTTH
Copy link
Owner

WSPTTH commented Aug 31, 2020

you may try to add a name for the evaluation dataset as

res = model.eval([('eval', dev_data)])

@GL123456
Copy link
Author

you may try to add a name for the evaluation dataset as

res = model.eval(['eval', dev_data])

is that add it at main.py ? I modified it this way, but there are still some problems here.


(SREPS) F:\SREPS-master\SREPS-master>python main.py --mode=eval --dev_file=F\filmtrust\dev --save_path=model\model.npz
Traceback (most recent call last):
File "main.py", line 59, in
res = model.eval(['eval', dev_data])
File "F:\SREPS-master\SREPS-master\model.py", line 238, in eval
for name, dataset in evals:
ValueError: too many values to unpack (expected 2)

@GL123456
Copy link
Author

Sorry to bother you, but I still encounter many problems when I try to modify it! Sincerely hope to get your help. Thank you very much!

@WSPTTH
Copy link
Owner

WSPTTH commented Aug 31, 2020

I forget to make the (name, dataset) tuple, you can try this:

res = model.eval([ ('eval', dev_data) ])

@GL123456
Copy link
Author

I forget to make the (name, dataset) tuple, you can try this:

res = model.eval([ ('eval', dev_data) ])

The matter has been settled. Thank you for your kindness!

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

2 participants