EntitySentiment icon indicating copy to clipboard operation
EntitySentiment copied to clipboard

IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

Open monajalal opened this issue 6 years ago • 0 comments

After running python RunRNN.py for a long while, at the end, I get this error:


  [33600]: mean loss 0.121167
  Seen 34000 in 1886.55 s
  [34000]: mean loss 0.137862
  Seen 34400 in 1909.40 s
  [34400]: mean loss 0.1298
  Seen 34800 in 1932.91 s
  [34800]: mean loss 0.120234
  [35000]: mean loss 0.121845
SGD complete: 35000 examples in 1948.43 seconds.
Traceback (most recent call last):
  File "RunRNN.py", line 85, in <module>
    score1.append(build_confusion_matrix(X_dev,Y_dev,model))
  File "/scratch2/debate_tweets/sentiment/EntitySentiment/misc.py", line 139, in build_confusion_matrix
    conf_arr[true_label,guessed_label]+=1
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

monajalal avatar Mar 09 '18 04:03 monajalal