FGVC-PIM icon indicating copy to clipboard operation
FGVC-PIM copied to clipboard

How to solve the maximum recursion depth error?

Open sunlight002 opened this issue 3 years ago • 0 comments

This is a great job, but I ran on my own dataset and encountered the following errors.

Start Training 3 Epoch..0%..10%..20% Start Evaluating 1 Epoch Start Training 2 Epoch Start Training 3 Epoch Traceback (most recent call last): File "main.py", line 297, in main(args, tlogger) File "main.py", line 249, in main train(args, epoch, model, scaler, amp_context, optimizer, schedule, train_loader) File "main.py", line 136, in train outs = model(datas) File "/DATA/sgwei/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "/DATA/sgwei/code/Fine_grained_PIM/models/pim_module/pim_module.py", line 404, in forward x = self.forward_backbone(x) File "/DATA/sgwei/code/Fine_grained_PIM/models/pim_module/pim_module.py", line 383, in forward_backbone return self.backbone(x) File "/DATA/sgwei/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/fx/graph_module.py", line 616, in wrapped_call raise e.with_traceback(None) RecursionError: maximum recursion depth exceeded while calling a Python object

and this is my configs

batch_size 16 c "./configs/classification_vit.yaml" data_size 448 device "cuda:0" eval_freq 10 exp_name "T3000" fpn_size 512 lambda_b 0.5 lambda_c 1 lambda_n 5 lambda_s 0 log_freq 100 max_epochs 20 max_lr 0.0005 model_name "vit" num_classes 5 num_selects layer1 512 layer2 256 layer3 128 layer4 64 num_workers 8 optimizer "SGD" pretrained desc null value null project_name "pim_classificationpip" save_dir "./records/pim_classificationpip/T3000/" train_root "/DATA/sgwei/Datasets/DataBase_v2/train/" update_freq 2 use_amp true use_combiner true use_fpn true use_selection true use_wandb true val_root "/DATA/sgwei/Datasets/MultiLesionClassify_DataBase_v2/val/" wandb_entity "sgwei" warmup_batchs 800 wdecay 0.0005

sunlight002 avatar Jul 20 '22 12:07 sunlight002