为什么我可以将列表放入tf.nn.softmax()
我检查了tensorflow指南。它表明tf.nn.softmax()
只能接受非空张量。谢谢
customized_softplus = keras.layers.Lambda (lambda x : tf.nn.softplus(x))
print(customized_softplus([-10.,-5.,0.,5.,10.]))
输出:
tf.Tensor([4.5417706e-05 6.7153489e-03 6.9314718e-01 5.0067153e+00 1.0000046e+01], shape=(5,), dtype=float32)
目前没有回答
相关问题 更多 >
编程相关推荐