Skip to content

TypeError: tensor(253923.8438, device='cuda:0') is not JSON serializable #4

@312shan

Description

@312shan

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 版本是多少呢?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions