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

AttributeError: 'numpy.ndarray' object has no attribute 'eval' #22

Open
maryhasan opened this issue Feb 1, 2019 · 1 comment
Open

Comments

@maryhasan
Copy link

After training the torchMoji model on the SemEval emotion dataset, I got the following error during the evaluation to measure F1:
/torchMoji-master/torchmoji/finetuning.py in find_f1_threshold(model, val_gen, test_gen, average)
178 f1_scores = []
179
--> 180 model.eval()
181 val_out = [(y, model(X)) for X, y in val_gen]
182 y_val, y_pred_val = (list(t) for t in zip(*val_out))
AttributeError: 'numpy.ndarray' object has no attribute 'eval'

Please help me to resolve this error.

@rezwanh001
Copy link

@mhasan1, Can you able to solve this issue?

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