0

当我不在我的模型中使用 dropout 进行猫和狗分类时,预测值保持正常,即所有图像的值都不相同。

但是,当我将tf.nn.dropoutwithkeep_prob = 0.8用于我的模型时,它被推荐用于规范化模型并获得更好的准确性,它会不断预测像这样的相同值。我该如何解决这个问题?那里的每个教程或代码都使用tflearn,但这不会发生。

array([[ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00]`
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
       [ 2.20128131e+00,  1.78127408e+00],
4

0 回答 0