tf.argmax(input, dimension, name=None)

参数:

  • input:输入数据
  • dimension:按某维度查找。

    dimension=0:按列查找;

    dimension=1:按行查找;

返回:

  • 最大值的下标
 a = tf.constant([1.,2.,3.,0.,9.,])
b = tf.constant([[1,2,3],[3,2,1],[4,5,6],[6,5,4]])
with tf.Session() as sess:
sess.run(tf.argmax(a, 0))
with tf.Session() as sess:
sess.run(tf.argmax(b, 0))
with tf.Session() as sess:
sess.run(tf.argmax(b, 1))

输出:

4

输出:

[3, 2, 2]

输出:

[2, 0 ,2, 0]

TensorFlow函数(七)tf.argmax()的更多相关文章

  1. Tensorflow中的tf.argmax()函数

    转载请注明出处:http://www.cnblogs.com/willnote/p/6758953.html 官方API定义 tf.argmax(input, axis=None, name=None ...

  2. TensorFlow函数:tf.lin_space

    函数:tf.lin_space 别名: tf.lin_space tf.linspace lin_space( start, stop, num, name=None ) 参见指南:生成常量,序列和随 ...

  3. TensorFlow函数:tf.reduce_sum

    tf.reduce_sum 函数 reduce_sum ( input_tensor , axis = None , keep_dims = False , name = None , reducti ...

  4. TensorFlow函数:tf.random_shuffle

    tf.random_shuffle 函数 random_shuffle( value, seed=None, name=None ) 定义在:tensorflow/python/ops/random_ ...

  5. TensorFlow函数:tf.truncated_normal

    tf.truncated_normal函数 tf.truncated_normal( shape, mean=0.0, stddev=1.0, dtype=tf.float32, seed=None, ...

  6. TensorFlow函数:tf.ones_like

    tf.ones_like 函数 ones_like( tensor, dtype=None, name=None, optimize=True ) 定义在:tensorflow/python/ops/ ...

  7. TensorFlow函数:tf.ones

    tf.ones 函数 ones( shape, dtype=tf.float32, name=None ) 定义于:tensorflow/python/ops/array_ops.py. 请参阅指南: ...

  8. TensorFlow函数:tf.zeros_like

    tf.zeros_like函数 tf.zeros_like( tensor, dtype=None, name=None, optimize=True ) 定义在:tensorflow/python/ ...

  9. Tensorflow函数:tf.zeros

    tf.zeros函数 tf.zeros( shape, dtype=tf.float32, name=None ) 定义在:tensorflow/python/ops/array_ops.py. 创建 ...

  10. 【转载】 TensorFlow函数:tf.Session()和tf.Session().as_default()的区别

    原文地址: https://blog.csdn.net/Enchanted_ZhouH/article/details/77571939 ------------------------------- ...

随机推荐

  1. CSS starts

    I have not written any articles here since I graduated from my university. Now I begin to write down ...

  2. python Django html 一对多数据实例 模态对话框添加数据

  3. Code Signal_练习题_matrixElementsSum

    After they became famous, the CodeBots all decided to move to a new building and live together. The ...

  4. IIS 部署 Python Django网站流程(受够了野路子)

    知道的,百度上搜出来的东西质量令人唏嘘.当你求助的时候多半还得靠自己,或者靠Google 介入正题,详细来一遍流程吧 当然,我是用Visual Studio 2019 来编辑开发Django项目的,如 ...

  5. How To Improve Deep Learning Performance

    如何提高深度学习性能 20 Tips, Tricks and Techniques That You Can Use ToFight Overfitting and Get Better Genera ...

  6. the detailed annotation of StringBuilder

    public int capacity() 返回当前容量.容量指可用于最新插入字符的存储量,超过这一容量便需要再次分配. 返回: 当前容量. public int length() 返回长度(字符数) ...

  7. oracle 用户创建、修改、删除

    创建用户: create user test identified by test; 修改密码: 1.alter user test identified by mima; 2.passw[ord]  ...

  8. 带你从零学ReactNative开发跨平台App开发(十)

    ReactNative跨平台开发系列教程: 带你从零学ReactNative开发跨平台App开发(一) 带你从零学ReactNative开发跨平台App开发(二) 带你从零学ReactNative开发 ...

  9. leetcode 之 Degree of an Array

    1.题目描述 Given a non-empty array of non-negative integers nums, the degree of this array is defined as ...

  10. 如何利用fiddler篡改发送请求和截取服务器信息

    一.断点的两种方式 1.before response:在request请求未到达服务器之前打断 2.after response:在服务器响应之后打断 二.全局打断 1.全局打断就是中断fiddle ...