huggingface / torchMoji

😇A pyTorch implementation of the DeepMoji model: state-of-the-art deep learning model for analyzing sentiment, emotion, sarcasm etc
MIT License
917 stars 190 forks source link

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

Open maryhasan opened 5 years ago

maryhasan commented 5 years ago

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 commented 4 years ago

@mhasan1, Can you able to solve this issue?