Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

TypeError: 0.84068537 is not JSON serializable #22

Open
sara-kassani opened this issue Oct 26, 2018 · 0 comments
Open

TypeError: 0.84068537 is not JSON serializable #22

sara-kassani opened this issue Oct 26, 2018 · 0 comments

Comments

@sara-kassani
Copy link

The error is for utils.py

utils.py", line 80, in train
write_event(log, step, loss=mean_loss)

utils.py", line 26, in write_event
log.write(json.dumps(data, sort_keys=True))

File "C:\Users\Lab\AppData\Local\Programs\Python\Python35\lib\json_init_.py", line 237, in dumps
**kw).encode(obj)
File "C:\Users\Lab\AppData\Local\Programs\Python\Python35\lib\json\encoder.py", line 198, in encode
chunks = self.iterencode(o, _one_shot=True)
File "C:\Users\Lab\AppData\Local\Programs\Python\Python35\lib\json\encoder.py", line 256, in iterencode
return _iterencode(o, 0)
File "C:\Users\Lab\AppData\Local\Programs\Python\Python35\lib\json\encoder.py", line 179, in default
raise TypeError(repr(o) + " is not JSON serializable")
TypeError: 0.84068537 is not JSON serializable

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant