chainer / chainer-chemistry

Chainer Chemistry: A Library for Deep Learning in Biology and Chemistry
MIT License
629 stars 130 forks source link

Report metrics as scalars #281

Closed mihaimorariu closed 5 years ago

mihaimorariu commented 5 years ago

When training a network on the CPU and using the Evaluator class to output the MAE or MSE, the reported values are scalars. However, when running the same code on the GPU, the reported values become arrays (and the whole output cannot be serialized into a JSON file). There seems to be a bug in Chainer's reporter class, since the conversion to a scalar is not automatically done, in this case. I will report this to the Chainer team, but this PR should be a temporary fix until the issue is settled.