fix: return

This commit is contained in:
Martin Eyben 2025-05-16 10:49:03 +02:00
parent 7670ecdabf
commit 6d0b682053

View File

@ -302,14 +302,6 @@ if __name__ == "__main__":
checkpoint = torch.load(args.m, weights_only=True) checkpoint = torch.load(args.m, weights_only=True)
mymodel.load_state_dict(checkpoint["model_state_dict"]) mymodel.load_state_dict(checkpoint["model_state_dict"])
if args.R is not None:
if args.m is None:
print("You need to specify weights for a model")
return
with gzip.open(args.R) as fz:
data = json.loads(fz.read().decode("utf-8"))
create_result_file(data)
if args.t is not None and args.T is not None: if args.t is not None and args.T is not None:
trainset = torch.load(args.t) trainset = torch.load(args.t)