PyTorch 0.4 test errors
szagoruyko opened this issue · 0 comments
szagoruyko commented
Need to fix these:
..........
----------------------------------------------------------------------
Ran 10 tests in 0.015s
OK
E.../Users/szagoruyko/anaconda3/lib/python3.6/site-packages/numpy/core/_methods.py:135: RuntimeWarning: Degrees of freedom <= 0 for slice
keepdims=keepdims)
/Users/szagoruyko/anaconda3/lib/python3.6/site-packages/numpy/core/_methods.py:127: RuntimeWarning: invalid value encountered in double_scalars
ret = ret.dtype.type(ret / rcount)
.....E
======================================================================
ERROR: testAPMeter (__main__.TestMeters)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_meters.py", line 208, in testAPMeter
ap = mtr.value()
File "/Users/szagoruyko/anaconda3/lib/python3.6/site-packages/torchnet/meter/apmeter.py", line 137, in value
ap[k] = precision[truth.byte()].sum() / max(truth.sum(), 1)
RuntimeError: Expected object of type torch.FloatTensor but found type torch.LongTensor for argument #2 'other'
======================================================================
ERROR: testmAPMeter (__main__.TestMeters)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_meters.py", line 329, in testmAPMeter
ap = mtr.value()
File "/Users/szagoruyko/anaconda3/lib/python3.6/site-packages/torchnet/meter/mapmeter.py", line 30, in value
return self.apmeter.value().mean()
File "/Users/szagoruyko/anaconda3/lib/python3.6/site-packages/torchnet/meter/apmeter.py", line 137, in value
ap[k] = precision[truth.byte()].sum() / max(truth.sum(), 1)
RuntimeError: Expected object of type torch.FloatTensor but found type torch.LongTensor for argument #2 'other'
----------------------------------------------------------------------
Ran 10 tests in 0.118s
FAILED (errors=2)