Closed DL-Alva closed 4 years ago
When I run this part of code:
model = siamese_model.SiameseMaskRCNN(mode="inference", model_dir=MODEL_DIR, config=config) model.load_checkpoint(checkpoint, training_schedule=train_schedule)
active_class_idx = np.array(coco_val.ACTIVE_CLASSES) - 1
print('starting evaluation ...') siamese_utils.evaluate_dataset(model, coco_val, coco_object, eval_type="bbox", dataset_type='coco', limit=0, image_ids=None, class_index=active_class_idx, verbose=1)
It reminds me ValueError: Subtract layer should be called on inputs of the same shape. However, it can run successfully when I convert the evaluate.jpynb into the file of evaluate.py.
Subtract
I was not able to reproduce this issue and will thus close it now! Please let me know if anyone else runs into the same problem!
When I run this part of code:
Load and evaluate model
Create model object in inference mode.
model = siamese_model.SiameseMaskRCNN(mode="inference", model_dir=MODEL_DIR, config=config) model.load_checkpoint(checkpoint, training_schedule=train_schedule)
Evaluate only active classes
active_class_idx = np.array(coco_val.ACTIVE_CLASSES) - 1
Evaluate on the validation set
print('starting evaluation ...') siamese_utils.evaluate_dataset(model, coco_val, coco_object, eval_type="bbox", dataset_type='coco', limit=0, image_ids=None, class_index=active_class_idx, verbose=1)
It reminds me ValueError:
Subtract
layer should be called on inputs of the same shape. However, it can run successfully when I convert the evaluate.jpynb into the file of evaluate.py.