You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "transE_pytorch.py", line 255, in
agent.append(trainCurve, epoch, total_loss[0])
File "/home/shan/venv/lib/python3.5/site-packages/hyperboard/agent.py", line 45, in append
value = value,
File "/usr/lib/python3.5/json/init.py", line 230, in dumps
return _default_encoder.encode(obj)
File "/usr/lib/python3.5/json/encoder.py", line 198, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/python3.5/json/encoder.py", line 256, in iterencode
return _iterencode(o, 0)
File "/usr/lib/python3.5/json/encoder.py", line 179, in default
raise TypeError(repr(o) + " is not JSON serializable")
TypeError: tensor(253923.8438, device='cuda:0') is not JSON serializable
agent 报错,请问你用的 pyTorch 和 hyperboard 版本是多少呢?
The text was updated successfully, but these errors were encountered:
Change agent.append(trainCurve, epoch, total_loss[0]) to agent.append(trainCurve, epoch, total_loss.cpu().numpy()[0]) may solve the problem.
It works on python3.5 and pytorch1.1.0.
Traceback (most recent call last):
File "transE_pytorch.py", line 255, in
agent.append(trainCurve, epoch, total_loss[0])
File "/home/shan/venv/lib/python3.5/site-packages/hyperboard/agent.py", line 45, in append
value = value,
File "/usr/lib/python3.5/json/init.py", line 230, in dumps
return _default_encoder.encode(obj)
File "/usr/lib/python3.5/json/encoder.py", line 198, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/python3.5/json/encoder.py", line 256, in iterencode
return _iterencode(o, 0)
File "/usr/lib/python3.5/json/encoder.py", line 179, in default
raise TypeError(repr(o) + " is not JSON serializable")
TypeError: tensor(253923.8438, device='cuda:0') is not JSON serializable
agent 报错,请问你用的 pyTorch 和 hyperboard 版本是多少呢?
The text was updated successfully, but these errors were encountered: