Yan*_*hao 3 python tensorflow tensor
我有一个占位符供输入:
Y = tf.placeholder(dtype=tf.float32, shape=(None, n_outputs))
Run Code Online (Sandbox Code Playgroud)
现在,我想创建一个与Y形状相同的常量:
w = Y.get_shape()
zero = tf.constant(np.zeros(w), dtype=tf.float32)
Run Code Online (Sandbox Code Playgroud)
错误返回:
__index__ returned non-int (type NoneType)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3579 次 |
| 最近记录: |