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
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?