demo 中resnet内存不足
Created by: gjtjx
试了试demo中的resnet 跑了一下,居然报内存不足,50层,自己的数据22类,共1000多张图,TianX 12G,空机开跑 resnet的配置如下: if not is_predict and data_provider: #train_list = 'train.list' if not is_test else None # mean.meta is mean file of ImageNet dataset. # mean.meta size : 3 x 224 x 224. # If you use three mean value, set like: # "mean_value:103.939,116.779,123.68;" args = { #'mean_meta': "model/mean_meta_224/mean.meta", 'mean_value': [103.939,116.779,123.68], 'image_size': 224, 'crop_size': 224, 'color': True, 'swap_channel:': [2, 1, 0] }
define_py_data_sources2(
train_list="/data/lulei/vr_train/data_list/veh_rcnn_list_train_more40_su.txt",
test_list="/data/lulei/vr_train/data_list/veh_rcnn_list_valid_more40_su.txt",
module='image_list_provider',
obj='processData',
args=args)
batch_size = 1 learning_rate = 0.1 / batch_size momentum = 0.9 weight_decay = 0.0001 * batch_size default_momentum(momentum) default_decay_rate(weight_decay) default_device(0)
train.sh中的内容如下:
paddle train
--config=$config
--dot_period=10
--log_period=1
#--test_all_data_in_one_period=1
--use_gpu=1
--gpu_id=[0,1]
#--parallel_nn=1
--trainer_count=1
--num_passes=300
--save_dir=$output
2>&1 | tee $log
train.sh 跑起来后长时间卡在 I0220 20:17:18.798452 34134 PyDataProvider2.cpp:243] loading dataprovider image_list_provider::processData [INFO 2017-02-20 20:17:18,807 image_list_provider.py:75] Image short side: 224 [INFO 2017-02-20 20:17:18,807 image_list_provider.py:76] Crop size: 224 [INFO 2017-02-20 20:17:18,807 image_list_provider.py:77] Meta path: None [INFO 2017-02-20 20:17:18,807 image_list_provider.py:80] DataProvider Initialization finished I0220 20:17:18.810070 34134 PyDataProvider2.cpp:243] loading dataprovider image_list_provider::processData [INFO 2017-02-20 20:17:18,810 image_list_provider.py:75] Image short side: 224 [INFO 2017-02-20 20:17:18,810 image_list_provider.py:76] Crop size: 224 [INFO 2017-02-20 20:17:18,810 image_list_provider.py:77] Meta path: None [INFO 2017-02-20 20:17:18,811 image_list_provider.py:80] DataProvider Initialization finished I0220 20:17:18.811949 34134 GradientMachine.cpp:86] Initing parameters.. I0220 20:17:30.876852 34134 GradientMachine.cpp:93] Init parameters done.
有什么建议么?