JiehongLin / Self-DPDN

Code for "Category-Level 6D Object Pose and Size Estimation using Self-Supervised Deep Prior Deformation Networks"
MIT License
52 stars 5 forks source link

TypeError: step() missing 1 required positional argument: 'step' #13

Closed pppkkk611 closed 8 months ago

pppkkk611 commented 8 months ago

when i run python train.py --gpus 0 --config config/unsupervised.yaml, i meet this problem and don't know how to fix it (DPDN) PS D:\pppkkk\Self-DPDN-main> python train.py --gpus 0 --config config/unsupervised.yaml set CUDA_VISIBLE_DEVICES as 0 2024-01-10 17:54:49,286 - **** Start Logging **** 2024-01-10 17:54:49,286 - Config (path: config/unsupervised.yaml) { "setting": "unsupervised", "optimizer": { "type": "Adam", "lr": 0.01, "betas": [ 0.5, 0.999 ], "eps": 1e-06, "weight_decay": 0 }, "lr_scheduler": { "type": "StepLR", "step_size": 1, "gamma": 0.5 }, "bn": { "bn_momentum": 0.9, "bn_decay": 0.5, "decay_step": 4000, "bnm_clip": 0.01 }, "max_epoch": 30, "num_mini_batch_per_epoch": 4000, "num_category": 6, "num_prior": 1024, "loss": { "gamma1": 5.0, "gamma2": 1.0, "lambda1": 0.2, "lambda2": 0.02, "beta1": 5.0, "beta2": 1.0 }, "train_dataset": { "img_size": 192, "sample_num": 1024, "shift_range": 0.01 }, "train_dataloader": { "syn_bs": 18, "real_bs": 6, "num_workers": 0, "shuffle": true, "drop_last": true, "pin_memory": false }, "test": { "img_size": 192, "sample_num": 1024 }, "rd_seed": 1, "per_val": 10, "per_write": 50, "exp_name": "unsupervised", "log_dir": "log\unsupervised", "gpus": "0", "checkpoint_epoch": -1 } 2024-01-10 17:54:49,288 - using gpu: 0 2024-01-10 17:54:49,289 - => creating model ... loading pretrained mdl. 2024-01-10 17:54:49,775 - #Total parameters : 180209279 1010 images found. 1083 models loaded. 796 images found. 18 models loaded. Traceback (most recent call last): File "train.py", line 151, in start_iter=start_iter) File "D:\pyh\Self-DPDN-main\utils\solver.py", line 38, in init step_size=cfg.max_epoch * cfg.num_mini_batch_per_epoch // 6, mode='triangular') File "D:\pyh\Self-DPDN-main\utils\scheduler.py", line 242, in init super().init(optimizer) File "C:\Users\user.conda\envs\DPDN\lib\site-packages\torch\optim\lr_scheduler.py", line 77, in init self.step() TypeError: step() missing 1 required positional argument: 'step'

JiehongLin commented 8 months ago

This issue might arise if the PyTorch version is not compatible.