【发布时间】:2018-02-01 02:34:48
【问题描述】:
我不擅长 Python。我想知道如何使用 Python 为 Tensforflow 中的占位符定义 feed_dict。我确实查找了我的问题,最接近的是 C++ here。
假设我有以下张量:
(<tf.Tensor 'Mul:0' shape=<unknown> dtype=float32>,)
在没有 feed_dict 的情况下看到它:
print sess.run('Mul:0')
带来这个错误:
InvalidArgumentError (see above for traceback): You must feed a value for placeholder tensor 'Mul' with dtype float
[[Node: Mul = Placeholder[dtype=DT_FLOAT, shape=[], _device="/job:localhost/replica:0/task:0/gpu:0"]()]]
感谢任何帮助。
【问题讨论】:
标签: python tensorflow floating-point placeholder