pytorch/torch/utils
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
..
backcompat Simplify python warning settings and cleanup tests. 2017-06-11 05:37:59 -04:00
bottleneck Add environment collection script (#6635) 2018-04-22 15:18:14 -04:00
data Refactor batch sampler (#8958) 2018-06-27 16:06:47 -07:00
ffi Make all of TH and THC C++. (#6913) 2018-04-28 07:45:02 -04:00
serialization Codemod to update our codebase to 0.4 standard (#6641) 2018-04-17 22:06:54 -04:00
trainer loss plugin: Fix indexing into a scalar (#9143) 2018-07-03 14:25:44 -07:00
__init__.py [pep8] Fix most lint automatically with autopep8 2017-01-28 01:15:51 +01:00
checkpoint.py Update checkpoint.py (#6943) 2018-04-25 08:43:58 -04:00
collect_env.py Fix collect_env.py for Windows (#8326) 2018-06-11 10:52:21 -04:00
cpp_extension.py Correct link flag order for GNU ld in utils.cpp_extension.load (#9021) 2018-06-29 08:24:07 -07:00
dlpack.py [dlpack] Memory management for dlpack 2017-10-21 20:19:51 +02:00
file_baton.py Create FileBaton to synchronize distributed JIT C++ extension builds (#6684) 2018-04-18 18:07:03 -04:00
hooks.py Make weight norm pickleable (#2066) 2017-07-12 17:21:22 -04:00
model_zoo.py Enable the general usage of _download_url_to_file (#9090) 2018-07-02 19:55:39 -07:00