| 查看: 866 | 回复: 3 | |||
| 当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖 | |||
LoseInVain新虫 (初入文坛)
|
[交流]
In tensorflow, how to use the placeholder's value before feeding?已有1人参与
|
||
|
在stack overflow里面发了一个问题,现在还没回答比较急,所以这里求助下~~ New to TensorFlow,Now I need to use the value in placeholder before feeding, something like: tensor = tf.placeholder(tf.float32, [None, 3]) Mat_items = tf.Variable(tf.random_normal([10,10])) Mat_users = tf.Variable(tf.random_normal([10,10])) item_index = tensor[:, 0] user_index = tensor[:, 1] rating = tensor[:, 2] Val = Mat_items[item_index, :]-Mat_users[user_index, :] while tensor is a placeholder with N rows 3 cols, first col and second col is the index to Mat_items and Mat_users respectively and Mat_items Mat_users are the Variables needed to be indexed. Running it will absolutely throw an error because item_index, user_index both are Tensor not numeric before feeding. So I wonder whether Tensorflow could realize this demand? Any suggestion will be appreciate! ![]() |
» 猜你喜欢
之前让一硕士生水了7个发明专利,现在这7个获批发明专利的维护费可从哪儿支出哈?
已经有5人回复
博士读完未来一定会好吗
已经有29人回复
博士申请都是内定的吗?
已经有5人回复
到新单位后,换了新的研究方向,没有团队,持续积累2区以上论文,能申请到面上吗
已经有12人回复
投稿精细化工
已经有4人回复
高职单位投计算机相关的北核或SCI四区期刊推荐,求支招!
已经有4人回复
导师想让我从独立一作变成了共一第一
已经有9人回复
读博
已经有4人回复
JMPT 期刊投稿流程
已经有4人回复
心脉受损
已经有5人回复
uerth
铁虫 (小有名气)
- 应助: 0 (幼儿园)
- 金币: 1805.4
- 红花: 1
- 帖子: 189
- 在线: 188.2小时
- 虫号: 2830772
- 注册: 2013-11-27
- 性别: GG
- 专业: 信息处理方法与技术
2楼2017-06-22 17:25:21
uerth
铁虫 (小有名气)
- 应助: 0 (幼儿园)
- 金币: 1805.4
- 红花: 1
- 帖子: 189
- 在线: 188.2小时
- 虫号: 2830772
- 注册: 2013-11-27
- 性别: GG
- 专业: 信息处理方法与技术
4楼2017-06-23 16:42:17














回复此楼