avisingh599 / visual-qa

[Reimplementation Antol et al 2015] Keras-based LSTM/CNN models for Visual Question Answering
https://avisingh599.github.io/deeplearning/visual-qa/
MIT License
481 stars 186 forks source link

Error with Progressbar #19

Open aniemerg opened 8 years ago

aniemerg commented 8 years ago

when running trainMLP.py, the training crashes in Keras' Progbar. The problem appears to be the following line 108: progbar.add(args.batch_size, values=[("train loss", loss)])

loss should probably be a float value of some sort, but when I look in the debugger, it is a list: [array(7.346083164215088, dtype=float32)]

The following change on line 108 appears to fix the issue: progbar.add(args.batch_size, values=[("train loss", loss[0].item(0))])