You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The attribute 'model' does not exist in the pl_module. Therefore information about the tiler are missing.
With other networks such as Padim the tiling works.
Tiling should work as it is working with other listed networks.
Screenshots
AttributeError: 'ReverseDistillation' object has no attribute 'model'
Pip/GitHub
GitHub
What version/branch did you use?
No response
Configuration YAML
n
Logs
File "Experiment1_TiledImages.py", line 50, in<module>
output = engine.fit(model=model, datamodule=folder_datamodule)
File "engine.py", line 533, in fit
self._setup_trainer(model)
File "engine.py", line 331, in _setup_trainer
self._trainer = Trainer(**self._cache.args)
File "argparse.py", line 70, in insert_env_defaults
return fn(self, **kwargs)
File "trainer.py", line 431, in __init__
self._callback_connector.on_trainer_init(
File "callback_connector.py", line 79, in on_trainer_init
_validate_callbacks_list(self.trainer.callbacks)
File "callback_connector.py", line 227, in _validate_callbacks_list
stateful_callbacks = [cb forcbin callbacks if is_overridden("state_dict", instance=cb)]
File "callback_connector.py", line 227, in<listcomp>
stateful_callbacks = [cb forcbin callbacks if is_overridden("state_dict", instance=cb)]
File "model_helpers.py", line 42, in is_overridden
raise ValueError("Expected a parent")
ValueError: Expected a parent
PS>& python.exe Experiment1_TiledImages.py
GPU available: True (cuda), used: True
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs
No implementation of `configure_transforms` was provided in the Lightning model. Using default transforms from the base class. This may not be suitable foryour use case. Please override `configure_transforms`in your model.
F1Score class exists forbackwards compatibility. It will be removedin v1.1. Please use BinaryF1Score from torchmetrics instead
Traceback (most recent call last):
File "Experiment1_TiledImages.py", line 50, in<module>
output = engine.fit(model=model, datamodule=folder_datamodule)
File "engine.py", line 540, in fit
self.trainer.fit(model, train_dataloaders, val_dataloaders, datamodule, ckpt_path)
File "trainer.py", line 544, in fit
call._call_and_handle_interrupt(
File "call.py", line 44, in _call_and_handle_interrupt
return trainer_fn(*args, **kwargs)
File "trainer.py", line 580, in _fit_impl
self._run(model, ckpt_path=ckpt_path)
File "trainer.py", line 949, in _run
call._call_setup_hook(self) # allow user to set up LightningModule in accelerator environment
File "call.py", line 93, in _call_setup_hook
_call_callback_hooks(trainer, "setup", stage=fn)
File "call.py", line 208, in _call_callback_hooks
fn(trainer, trainer.lightning_module, *args, **kwargs)
File "tiler_configuration.py", line 65, in setup
if isinstance(pl_module, AnomalyModule) and hasattr(pl_module.model, "tiler"):
File "module.py", line 1709, in __getattr__
raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
AttributeError: 'ReverseDistillation' object has no attribute 'model'
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Describe the bug
The attribute 'model' does not exist in the pl_module. Therefore information about the tiler are missing.
With other networks such as Padim the tiling works.
Dataset
Other (please specify in the text field below)
Model
Reverse Distillation
Steps to reproduce the behavior
tiler_config_callback = TilerConfigurationCallback(enable=True, tile_size=[256,256], stride=256)
folder_datamodule = Folder(
name="Name",
normal_dir="C:/Users/healthy",
abnormal_dir="C:/Users/unhealthy,
task=TaskType.CLASSIFICATION,
image_size = (512,512),
num_workers=0,
train_batch_size= 2,
eval_batch_size=2,
seed=40
)
model = ReverseDistillation()
engine = Engine(task=TaskType.CLASSIFICATION,
callbacks = [tiler_config_callback],
max_epochs = 200,
check_val_every_n_epoch= 1,
logger=logger)
output = engine.fit(model=model, datamodule=folder_datamodule)
OS information
OS information:
Expected behavior
Tiling should work as it is working with other listed networks.
Screenshots
AttributeError: 'ReverseDistillation' object has no attribute 'model'
Pip/GitHub
GitHub
What version/branch did you use?
No response
Configuration YAML
n
Logs
Code of Conduct
The text was updated successfully, but these errors were encountered: