Loading a checkpoint when running TrainingAnomalyDetector_public
Closed this issue · 1 comments
SkyWalkerJJJ commented
When I load an existed checkpoint this line, an error shows below.
My question is should the code define something as
network = AnomalyDetector(args.feature_dim)
model = TorchModel.load_model(args.checkpoint)
Not really sure about the coding structure of TorchModel, so I want to confirm with you is it right to add network = AnomalyDetector(args.feature_dim) before it, and it will work perfectly?
Traceback (most recent call last):
File "train_anomaly_detector.py", line 153, in <module>
criterion = RegularizedLoss(network, custom_objective).to(device)
NameError: name 'network' is not defined
ekosman commented
Definitely! Thanks for reporting this. I will fix it soon.
Can you check if training under the branch bugfix/model_checkpoint
works?