Alessandro Evangelista

Results 19 comments of Alessandro Evangelista

@alexriedel1 this is not enough. Since if I set `model.image_threshold.value = ... model.pixel_threshold.value = ... `, this will be overwritte by the function `trainer.predict(model=model, dataloaders=[dataloader])`, this function will also overwrite...

@alexriedel1 This is the full implementation of my script for inference on PatchCore ```python model = get_model(config) callbacks = get_callbacks(config) trainer = Trainer(callbacks=callbacks, **config.trainer) # Set custom threshold model.adaptive_threshold =...

@alexriedel1 Printing the custom thresholds with ` print(model.pixel_threshold.value, model.image_threshold.value) ` before and after the trainer.predict(), what I get is this, I paste also the warnings I get ``` tensor(100.) tensor(100.)...

@ashwinvaidya17 Thanks, this will work on avoid threshold overwriting. However I had to add this to make it work: ```python model_state_dict = torch.load(my_args['weights'], map_location=device)["state_dict"] model_state_dict.pop("normalization_metrics.min", None) # this is a...

> Does the fix described in #387 resolve the issue? @GillesVandewiele Nope, because this tryies to solve the 'loading' pointing out that "from_" is a method class, but I don't...

> One way to circumvent the issues is to just store the learned shapelets and load them in again when doing inference, these contain all the valuable information of a...

I undesrtood that the problem is for the Adam optimizer, that have problem to be serialized. I'm trying to understand how to fix it. @rtavenar sure, I'll share it here...

Just a quick fix, since the problem is the Adam optimizer, and after the fit i won't need it anymore I just removed the optimizer. ``` dummy = LearningShapelets(*args) #...

It doesn't work with Torch Hub

@gudovskiy any news about that?