我正在使用 Tensorflow 中的贝叶斯优化为我的卷积神经网络 (CNN) 进行超参数优化。我收到了这个错误:
ResourceExhaustedError(有关回溯,请参见上文):OOM 分配形状为 [4136,1,180,432] 的张量并通过分配器 GPU_0_bfc 在 /job:localhost/replica:0/task:0/device:GPU:0 上键入 float
我优化了这些超参数:
dim_batch_size = Integer(low=1, high=50, name='batch_size')
dim_kernel_size1 = Integer(low=1, high=75, name='kernel_size1')
dim_kernel_size2 = Integer(low=1, high=50, name='kernel_size2')
dim_depth = Integer(low=1, high=100, name='depth')
dim_num_hidden = Integer(low=5, high=1500, name='num_hidden')
dim_num_dense_layers = Integer(low=1, high=5, name='num_dense_layers')
dim_learning_rate = Real(low=1e-6, high=1e-2, prior='log-uniform',
name='learning_rate')
dim_activation = Categorical(categories=['relu', 'sigmoid'],
name='activation')
dim_max_pool = Integer(low=1, high=100, name='max_pool')
dimensions = [dim_batch_size,
dim_kernel_size1,
dim_kernel_size2,
dim_depth,
dim_num_hidden,
dim_num_dense_layers,
dim_learning_rate,
dim_activation,
dim_max_pool]
说资源枯竭。为什么是这样?
是不是因为我优化了太多的超参数?还是有一些尺寸不匹配?或者我是否分配了超出正确操作允许范围的超参数范围?