huggingface / huggingface/torchMoji

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

Open
#22 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
920
Forks
185
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.