ChainerCV SSD512 MODEL 未训练
ChainerCV SSD512 MODEL not training
我已经使用 SSD300(imagenet 预训练模型)对两个 class classification:[Basketball-ChainerCV] (https://github.com/atom2k17/Basketball-ChainerCV/blob/master/basketballproject.py) 进行了检测和识别。训练和预测都很好。但是当我在训练时使用 SSD512(imagenet 预训练模型)时,出现以下错误:
/usr/local/lib/python3.6/dist-
packages/chainer/functions/connection/convolution_2d.py in
_forward_cudnn(self, x, W, b, y)
226 cuda.cudnn.convolution_forward(
227 x, W, b, y, pad, stride, dilation, self.groups,
228 auto_tune=auto_tune, tensor_core=tensor_core)
229 return y,
230
cupy/cudnn.pyx in cupy.cudnn.convolution_forward()
cupy/cudnn.pyx in cupy.cudnn._find_algorithm_fwd()
cupy/cuda/memory.pyx in cupy.cuda.memory.alloc()
cupy/cuda/memory.pyx in cupy.cuda.memory.MemoryPool.malloc()
cupy/cuda/memory.pyx in cupy.cuda.memory.MemoryPool.malloc()
cupy/cuda/memory.pyx in cupy.cuda.memory.SingleDeviceMemoryPool.malloc()
cupy/cuda/memory.pyx in cupy.cuda.memory.SingleDeviceMemoryPool._malloc()
cupy/cuda/memory.pyx in cupy.cuda.memory._try_malloc()
OutOfMemoryError: out of memory to allocate 1073741824 bytes (total
12092240384 bytes)
我正在使用 Google Colab GPU 环境。感谢任何解决此问题的建议。
正如@corochann 在评论中所建议的那样,当执行 trainer.run() 将 batch_size 从 32 取为 4 时,这个内存问题就解决了。所以取一个较小的 batch_size 是解决方案在这里。
我已经使用 SSD300(imagenet 预训练模型)对两个 class classification:[Basketball-ChainerCV] (https://github.com/atom2k17/Basketball-ChainerCV/blob/master/basketballproject.py) 进行了检测和识别。训练和预测都很好。但是当我在训练时使用 SSD512(imagenet 预训练模型)时,出现以下错误:
/usr/local/lib/python3.6/dist-
packages/chainer/functions/connection/convolution_2d.py in
_forward_cudnn(self, x, W, b, y)
226 cuda.cudnn.convolution_forward(
227 x, W, b, y, pad, stride, dilation, self.groups,
228 auto_tune=auto_tune, tensor_core=tensor_core)
229 return y,
230
cupy/cudnn.pyx in cupy.cudnn.convolution_forward()
cupy/cudnn.pyx in cupy.cudnn._find_algorithm_fwd()
cupy/cuda/memory.pyx in cupy.cuda.memory.alloc()
cupy/cuda/memory.pyx in cupy.cuda.memory.MemoryPool.malloc()
cupy/cuda/memory.pyx in cupy.cuda.memory.MemoryPool.malloc()
cupy/cuda/memory.pyx in cupy.cuda.memory.SingleDeviceMemoryPool.malloc()
cupy/cuda/memory.pyx in cupy.cuda.memory.SingleDeviceMemoryPool._malloc()
cupy/cuda/memory.pyx in cupy.cuda.memory._try_malloc()
OutOfMemoryError: out of memory to allocate 1073741824 bytes (total
12092240384 bytes)
我正在使用 Google Colab GPU 环境。感谢任何解决此问题的建议。
正如@corochann 在评论中所建议的那样,当执行 trainer.run() 将 batch_size 从 32 取为 4 时,这个内存问题就解决了。所以取一个较小的 batch_size 是解决方案在这里。