美文网首页
Tensorflow 1.0 函数示例

Tensorflow 1.0 函数示例

作者: Double_E | 来源:发表于2017-04-26 10:40 被阅读20次

tf.nn.top_k

  • 返回最后一个维度上的top-k个值及其位置
  • val idx的维度均为【input.shape[:-1], k】
Paste_Image.png

tf.slice

  • 从begin开始,取一个大小为size的张量
Paste_Image.png

tf.gather

  • 按照 indices从params中选取
  • 输出维度为【len(indices), params[1:]】
  • 下图将a中的shape[0]中的[1,2]取出来
Paste_Image.png Paste_Image.png Paste_Image.png

相关文章

网友评论

      本文标题:Tensorflow 1.0 函数示例

      本文链接:https://www.haomeiwen.com/subject/lhkizttx.html