OOM when allocating tensor with shape[300,14,14,256] and typ

训练mask-R-cnn模型,训练时将model.train(dataset_train, dataset_val,learning_rate=config.LEARNING_RATE,epochs=40,layers='heads')中的layers='heads’修改成layers='4+',结果报错

OOM when allocating tensor with shape[300,256,28,28] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc

入下面截图

原来的heads模型是可以训练的,但改成all或者3+都不能运行,我的服务器是8G的显存,网上查了一卷说是bach_size过大,后来修改了GPU_COUNT=1或IMAGES_GPU=1,模型可以正常训练了,不过有GPU的服务器最好改IMAGES_GPU=1

(0)

相关推荐