TensorFlow函数(七)tf.argmax()
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()的更多相关文章
- Tensorflow中的tf.argmax()函数
转载请注明出处:http://www.cnblogs.com/willnote/p/6758953.html 官方API定义 tf.argmax(input, axis=None, name=None ...
- TensorFlow函数:tf.lin_space
函数:tf.lin_space 别名: tf.lin_space tf.linspace lin_space( start, stop, num, name=None ) 参见指南:生成常量,序列和随 ...
- TensorFlow函数:tf.reduce_sum
tf.reduce_sum 函数 reduce_sum ( input_tensor , axis = None , keep_dims = False , name = None , reducti ...
- TensorFlow函数:tf.random_shuffle
tf.random_shuffle 函数 random_shuffle( value, seed=None, name=None ) 定义在:tensorflow/python/ops/random_ ...
- TensorFlow函数:tf.truncated_normal
tf.truncated_normal函数 tf.truncated_normal( shape, mean=0.0, stddev=1.0, dtype=tf.float32, seed=None, ...
- TensorFlow函数:tf.ones_like
tf.ones_like 函数 ones_like( tensor, dtype=None, name=None, optimize=True ) 定义在:tensorflow/python/ops/ ...
- TensorFlow函数:tf.ones
tf.ones 函数 ones( shape, dtype=tf.float32, name=None ) 定义于:tensorflow/python/ops/array_ops.py. 请参阅指南: ...
- TensorFlow函数:tf.zeros_like
tf.zeros_like函数 tf.zeros_like( tensor, dtype=None, name=None, optimize=True ) 定义在:tensorflow/python/ ...
- Tensorflow函数:tf.zeros
tf.zeros函数 tf.zeros( shape, dtype=tf.float32, name=None ) 定义在:tensorflow/python/ops/array_ops.py. 创建 ...
- 【转载】 TensorFlow函数:tf.Session()和tf.Session().as_default()的区别
原文地址: https://blog.csdn.net/Enchanted_ZhouH/article/details/77571939 ------------------------------- ...
随机推荐
- 使用rem编写自适应屏幕网页造成div被span撑高的解决办法
原始代码: <html> <head> <meta charset="utf-8"> <meta content="ie=edg ...
- Supervisord安装和配置
http://zhangweide.cn/archive/2013/supervisor-note.html Supervisord supervisord的出现,结束了我这苦恼的问题,它可以帮你守护 ...
- cf623A. Graph and String(二分图 构造)
题意 题目链接 Sol 可以这样考虑,在原图中没有边相连的点的值肯定是a / c 那么直接二分图染色即可 #include<bits/stdc++.h> #define LL long l ...
- C# 生成缩略图 去除图片旋转角度
图片生成缩略图会有旋转角度 /// <summary> /// 测试JRE图片压缩后图片会旋转问题 /// </summary> public void Uploadimg1( ...
- ArcGIS10.3+Oracle12C+ArcGIS Server10.3安装布署(之三)
1.将Oracle的客户端切换到64位 (1)将C:\下的instantclient_12_1目录重命名为instantclient_12_1X86 (2)从Oracle的官方网站下载 insta ...
- flutter控件之CheckBox
import 'package:flutter/material.dart'; class LearnCheckBox extends StatefulWidget{ @override State& ...
- flutter实现(OutlineButton)线框按钮
在flutter的控件里 常用按钮有:FlatButton,RaisedButton,FloatingActionButton,OutlineButton. FlatButton是扁平的,没有阴影的. ...
- 云卡门禁苹果SDK_BLEDOOR_SDK_IOS_2016_12_15
// // BLElib.h // BLElib // // Created by szbosk on 16/8/16. // Copyright © 2016年 szbosk. All rights ...
- Storm默认配置 default.yaml
default.yaml文件所在位置:apache-storm-0.9.4.tar.gz/apache-storm-0.9.4/lib/storm-core-0.94.jar/default.yaml ...
- INFO: Font Metrics and the Use of Negative lfHeight
INFO: Font Metrics and the Use of Negative lfHeight Print Email Article translations Article ID ...