paddleCV/ssd training error : Local variable 'test_map' referenced before assignment
Created by: SunChao3555
/home/sunchao/anaconda3/envs/python35/bin/python3.5 /home/sunchao/models-develop/PaddleCV/ssd/train.py
----------- Configuration Arguments -----------
ap_version: 11point
batch_size: 64
data_dir: data/pascalvoc
dataset: pascalvoc
enable_ce: False
epoc_num: 120
image_shape: 3,300,300
learning_rate: 0.001
mean_BGR: 127.5,127.5,127.5
model_save_dir: model
parallel: True
pretrained_model: pretrained/ssd_mobilenet_v1_coco/
use_gpu: False
------------------------------------------------
I0704 11:00:20.832667 6615 parallel_executor.cc:329] The number of CPUPlace, which is used in ParallelExecutor, is 2. And the Program will be copied 2 copies
I0704 11:00:21.723721 6615 build_strategy.cc:340] SeqOnlyAllReduceOps:0, num_trainers:1
import ujson error: No module named 'ujson' use json
import ujson error: No module named 'ujson' use json
Epoc 0, batch 0, loss 38.866570, time 0.00049
Epoc 0, batch 10, loss 10.186079, time 14.33592
Epoc 0, batch 20, loss 8.082126, time 22.44005
Epoc 0, batch 30, loss 7.095359, time 19.11344
Epoc 0, batch 40, loss 7.257343, time 19.97595
Epoc 0, batch 50, loss 7.060732, time 8.09673
Epoc 0, batch 60, loss 6.570441, time 45.05368
Epoc 0, batch 70, loss 7.062677, time 8.17861
Epoc 0, batch 80, loss 5.846516, time 12.95178
Epoc 0, batch 90, loss 6.432323, time 13.21465
Epoc 0, batch 100, loss 5.780276, time 16.27642
Epoc 0, batch 110, loss 5.577415, time 12.16178
Epoc 0, batch 120, loss 5.725643, time 18.41036
Epoc 0, batch 130, loss 4.751263, time 8.13912
Epoc 0, batch 140, loss 5.574385, time 9.84319
Epoc 0, batch 150, loss 5.201525, time 8.12551
Epoc 0, batch 160, loss 5.676281, time 8.15622
/home/sunchao/.local/lib/python3.5/site-packages/numpy/core/fromnumeric.py:3118: RuntimeWarning: Mean of empty slice.
out=out, **kwargs)
/home/sunchao/.local/lib/python3.5/site-packages/numpy/core/_methods.py:85: RuntimeWarning: invalid value encountered in double_scalars
ret = ret.dtype.type(ret / rcount)
Traceback (most recent call last):
File "/home/sunchao/models-develop/PaddleCV/ssd/train.py", line 332, in <module>
main()
File "/home/sunchao/models-develop/PaddleCV/ssd/train.py", line 328, in main
val_file_list=val_file_list)
File "/home/sunchao/models-develop/PaddleCV/ssd/train.py", line 266, in train
best_map, mean_map = test(epoc_id, best_map)
File "/home/sunchao/models-develop/PaddleCV/ssd/train.py", line 222, in test
print("Epoc {0}, test map {1}".format(epoc_id, test_map[0]))
UnboundLocalError: local variable 'test_map' referenced before assignment