I encountered this problem while running maskrcnn,defaults.py file have _C.SOLVER.TEST_PERIOD = 0 ,but when I debug this code , it can not read this attribute , does anyone have this problem?I would appreciate it if you could help me solve this problem.
Traceback (most recent call last):
File "/home/hyh/Code/python/CL/CL_OBJECT_DETECTION/source/maskrcnn-benchmark/tools/train_net.py", line 202, in
main()
File "/home/hyh/Code/python/CL/CL_OBJECT_DETECTION/source/maskrcnn-benchmark/tools/train_net.py", line 195, in main
model = train(cfg, args.local_rank, args.distributed)
File "/home/hyh/Code/python/CL/CL_OBJECT_DETECTION/source/maskrcnn-benchmark/tools/train_net.py", line 76, in train
test_period = cfg.SOLVER.TEST_PERIOD
File "/home/hyh/anaconda3/envs/maskrcnn/lib/python3.8/site-packages/yacs/config.py", line 141, in getattr
raise AttributeError(name)
AttributeError: TEST_PERIOD
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
PyTorch Version (e.g., 1.0):1.6.0
OS (e.g., Linux):ubuntu
How you installed PyTorch (conda, pip, source):conda
Build command you used (if compiling from source):--config-file "/home/hyh/Code/python/CL/CL_OBJECT_DETECTION/copy/maskrcnn-benchmark/configs/e2e_mask_rcnn_R_50_C4_1x.yaml" SOLVER.IMS_PER_BATCH 2 SOLVER.BASE_LR 0.0025 SOLVER.MAX_ITER 720000 SOLVER.STEPS "(480000, 640000)" TEST.IMS_PER_BATCH 1 MODEL.RPN.FPN_POST_NMS_TOP_N_TRAIN 2000
🐛 Bug
To Reproduce
I encountered this problem while running maskrcnn,defaults.py file have _C.SOLVER.TEST_PERIOD = 0 ,but when I debug this code , it can not read this attribute , does anyone have this problem?I would appreciate it if you could help me solve this problem.
train function: data_loader = make_data_loader( cfg, is_train=True, is_distributed=distributed, start_iter=arguments["iteration"], )
Expected behavior
Traceback (most recent call last): File "/home/hyh/Code/python/CL/CL_OBJECT_DETECTION/source/maskrcnn-benchmark/tools/train_net.py", line 202, in
main()
File "/home/hyh/Code/python/CL/CL_OBJECT_DETECTION/source/maskrcnn-benchmark/tools/train_net.py", line 195, in main
model = train(cfg, args.local_rank, args.distributed)
File "/home/hyh/Code/python/CL/CL_OBJECT_DETECTION/source/maskrcnn-benchmark/tools/train_net.py", line 76, in train
test_period = cfg.SOLVER.TEST_PERIOD
File "/home/hyh/anaconda3/envs/maskrcnn/lib/python3.8/site-packages/yacs/config.py", line 141, in getattr
raise AttributeError(name)
AttributeError: TEST_PERIOD
Environment
Please copy and paste the output from the environment collection script from PyTorch (or fill out the checklist below manually).
You can get the script and run it with:
conda
,pip
, source):condaAdditional context