小编zha*_*ulu的帖子

Tensorflow张量值图

我的问题是如何用字典映射张量?例如像这样:

dict = {1:3, 2:4}
origin_tensor = tf.Variable([1,2,1], tf.int32)
Run Code Online (Sandbox Code Playgroud)

字典很大。现在,如何根据 dict 制作地图选项以将张量映射到 tf.Variable([3,4,3], tf.int32) ?

更重要的是,映射时无法使用 .eval() ,您可以认为 origin_tensor 是来自批读取器的标签张量。

python machine-learning tensorflow

5
推荐指数
1
解决办法
1969
查看次数

标签 统计

machine-learning ×1

python ×1

tensorflow ×1