Unverified Commit d05b5083 authored by Ian Butler's avatar Ian Butler Committed by GitHub
Browse files

Move to CPU before attempting to convert to numpy. (#922)

parent 4870580f
...@@ -187,7 +187,7 @@ def unpack_tensor_to_dict(tensor_data): ...@@ -187,7 +187,7 @@ def unpack_tensor_to_dict(tensor_data):
Returns: Returns:
A Python dictionary containing the unpacked data. A Python dictionary containing the unpacked data.
""" """
json_bytes = bytes(tensor_data.numpy()) json_bytes = bytes(tensor_data.cpu().numpy())
json_str = json_bytes.decode('utf-8') json_str = json_bytes.decode('utf-8')
unpacked_dict = json.loads(json_str) unpacked_dict = json.loads(json_str)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment