train_predict: .list() → .tolist()

This commit is contained in:
Starbeamrainbowlabs 2022-10-26 17:12:36 +01:00
parent 4f9d543695
commit 74f2cdb900
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -165,11 +165,11 @@ def do_jsonl(args, ai, dataset, model_params):
item_obj = {}
if "rainfall_actual" in args.log:
item_obj["rainfall_actual"] = rainfall_actual_batch[i_batch].numpy().list()
item_obj["rainfall_actual"] = rainfall_actual_batch[i_batch].numpy().tolist()
if "water_actual" in args.log:
item_obj["water_actual"] = water_actual.numpy().list()
item_obj["water_actual"] = water_actual.numpy().tolist()
if "water_predict" in args.log:
item_obj["water_predict"] = water_predict.numpy().list()
item_obj["water_predict"] = water_predict.numpy().tolist()
handle.write(json.dumps(item_obj, separators=(',', ':'))+"\n") # Ref https://stackoverflow.com/a/64710892/1460422