pytorch/torch/utils/trainer
Roy Fejgin b479494ed4 loss plugin: Fix indexing into a scalar (#9143)
Summary:
The loss plugin was using the old-style loss[0] access, which in PyTorch 0.4 and
later is an attempt to index into a scalar, generating a warning.
Replaced that with loss.item().

This fixes
https://github.com/pytorch/pytorch/issues/9142
Closes https://github.com/pytorch/pytorch/pull/9143

Differential Revision: D8726403

Pulled By: ezyang

fbshipit-source-id: 6c496b140a74d22c8423f511db901b18615fd6fa
2018-07-03 14:25:44 -07:00
..
plugins loss plugin: Fix indexing into a scalar (#9143) 2018-07-03 14:25:44 -07:00
__init__.py Initial utils implementation 2016-09-08 18:49:48 -07:00
trainer.py Codemod to update our codebase to 0.4 standard (#6641) 2018-04-17 22:06:54 -04:00