'NeuralNetwork' object has no attribute 'log'
Hello I am trying to train a neural network using pytorch lightning. I have run into an issue with the trainer when I try to run the program. I am getting the following issue:
GPU available: False, used: False
TPU available: False, using: 0 TPU cores
Traceback (most recent call last):

  File "/home/PytorchLightningGRUtraining.py", line 179, in <module>
    main(args)

  File "/home/PytorchLightningGRUtraining.py", line 171, in main
    trainer.fit(model, dm.train_dataloader(), dm.val_dataloader())

  File "/home/anaconda3/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 449, in fit
    self.train_loop.setup_fit(model, train_dataloader, val_dataloaders, datamodule)

  File "/home/anaconda3/lib/python3.8/site-packages/pytorch_lightning/trainer/training_loop.py", line 123, in setup_fit
    self.trainer.callback_connector.attach_model_logging_functions(model)

  File "/home/anaconda3/lib/python3.8/site-packages/pytorch_lightning/trainer/connectors/callback_connector.py", line 123, in attach_model_logging_functions
    callback.log = model.log

  File "/home/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in __getattr__
    raise AttributeError("'{}' object has no attribute '{}'".format(

AttributeError: 'NeuralNetwork' object has no attribute 'log'

I defined the logger for the trainer after I created an instance of the model class. What am I doing wrong?
did you pass in a lightningmodule instance?
class YourModel(pl.LightningModule): <- here?
    ...