Lightning-AI / pytorch-lightning

Pretrain, finetune ANY AI model of ANY size on multiple GPUs, TPUs with zero code changes.
https://lightning.ai
Apache License 2.0
28.16k stars 3.37k forks source link

Tpye error: 'int' Object is not callable when pytorch_lighning is upgraded to version 0.8.1 or above。However, in version 0.7.1, it works normally #3569

Closed zhouwuxiong closed 3 years ago

zhouwuxiong commented 4 years ago

Tpye error: 'int' Object is not callable when pytorch_lighning is upgraded to version 0.8.1 or above。However, in version 0.7.1, it works normally

Traceback (most recent call last): File "/home/zwx/pointNet_family/pointnet.pytorch-master/utils/mytrain.py", line 210, in triner.fit(model) File "/home/zwx/anaconda3/envs/PCReg/lib/python3.6/site-packages/pytorch_lightning/trainer/states.py", line 48, in wrapped_fn result = fn(self, *args, **kwargs) File "/home/zwx/anaconda3/envs/PCReg/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 1084, in fit results = self.accelerator_backend.train(model) File "/home/zwx/anaconda3/envs/PCReg/lib/python3.6/site-packages/pytorch_lightning/accelerators/cpu_backend.py", line 39, in train results = self.trainer.run_pretrain_routine(model) File "/home/zwx/anaconda3/envs/PCReg/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 1239, in run_pretrain_routine self.train() File "/home/zwx/anaconda3/envs/PCReg/lib/python3.6/site-packages/pytorch_lightning/trainer/training_loop.py", line 347, in train model.train() TypeError: 'int' object is not callable

What's the reason? anything help will be appreciate

github-actions[bot] commented 4 years ago

Hi! thanks for your contribution!, great first issue!

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it hasn't had any recent activity. This issue will be closed in 7 days if no further activity occurs. Thank you for your contributions, Pytorch Lightning Team!

ydcjeff commented 3 years ago

@zhouwuxiong could you try 1.0.4 and see if this still exists? If this still exists, please use the colab for reproducible example

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it hasn't had any recent activity. This issue will be closed in 7 days if no further activity occurs. Thank you for your contributions, Pytorch Lightning Team!