From 446202ceda9f188c418a442197a446c624ba5973 Mon Sep 17 00:00:00 2001 From: Filippo Date: Tue, 6 Feb 2024 17:09:58 +0100 Subject: [PATCH] try --- main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.py b/main.py index a188d0e..3cb1e34 100644 --- a/main.py +++ b/main.py @@ -8,6 +8,7 @@ import torch.nn as nn import torch.optim as optim from PIL import Image +import json from torch.utils.data import DataLoader @@ -294,6 +295,9 @@ def my_clip_train(in_path, out_path, model_name, source, in_base, evaluations['mare_var'].append(memory_evaluation(args.in_path, 'novel_test/', memory, bn_n_train, ['rgba'], dic_test, vocabs)) + with open(os.path.join(args.out_path, evaluations), 'w') as json_file: + json.dump(evaluations, json_file) + ## Train for new word acquisition ## without #model_name = 'nw_acquisition_old.pickle'