knowledge_representation_pytorch
knowledge_representation_pytorch copied to clipboard
TypeError: tensor(253923.8438, device='cuda:0') is not JSON serializable
Traceback (most recent call last):
File "transE_pytorch.py", line 255, in
agent 报错,请问你用的 pyTorch 和 hyperboard 版本是多少呢?
The same problem. It occurs on every dataset.
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.