Open sesevgen opened 6 years ago
So this happens because miprometheus.models.thalnet.ThalnetModule
inherits from torch.nn.Module
and not miprometheus.models.Model
, which is the base Model class and defines the logger as a class attribute:
This is common to the way some models are implemented in mip
, when they are constituted from several classes that inherit from torch.nn.Module
(to access autograd
), and only have their main class inheriting from Model
.
Having them access a logger would then require to add the following lines in each file where there are defined:
Perhaps there is a better way to do this? @tkornut Do you have an idea?
Describe the bug models/thalnet/thalnet_module.py is the source of the error, on line 131. Trying to log an error to logger causes this.
To Reproduce Steps to reproduce the behavior: Happened as I'm testing changes for #58 - I suspect just feeding in an incorrect sized data as described on the if statement on line 130 should trigger it.
Expected behavior Should properly log to logger.
Desktop (please complete the following information):