Loading model and self.conf
I'm using pl to train a model. I read my config and turn it into an object using:
class obj(object):
def __init__(self, d):
        for a, b in d.items():
            if isinstance(b, (list, tuple)):
               setattr(self, a, [obj(x) if isinstance(x, dict) else x for x in b])
            else:
               setattr(self, a, obj(b) if isinstance(b, dict) else b)

Then, I pass this config to my model and set its variables.
I trained my model without any bugs.
Now, when I want to load the ckpt, I use the exact same code and config, but it gives me this error:
 ...self.model = UNet(self.conf.model.in_channel,
AttributeError: 'dict' object has no attribute 'model'

And this is my model definition:
class my_model(pl.LightningModule):
    def __init__(self, conf):
        super().__init__()
        self.conf  = conf
        self.model = UNet(self.conf.model.in_channel,
                                      self.conf.model.channel)

Could you tell me what is going on? Because I didn't have any issue in training my model, and this is happening only when I'm using the .load_from_checkpoint.
Thanks.