码迷,mamicode.com
首页 >  
搜索关键字:tensor    ( 809个结果
第一节 图的概念
import tensorflow as tf import os os.environ['TF_CPP_MIN_LOG_LEVEL']='2' # 修改TensorFlow警告信息级别 # 创建一张图包含了op和tensor,使用图是在上下文环境中的 # op:只要用TensorFlow的API定 ...
分类:其他好文   时间:2020-03-30 12:37:31    阅读次数:77
常用Tensor操作
最近在看开发文档们就顺便记录一下。 1: torch.index_select(input, dim, indices,out=None) 沿着指定维度对输入进行切片,取index中指定的相应项(index为一个LongTensor),然后返回到一个新的张量,返回的张量与原始张量_Tensor_有相 ...
分类:其他好文   时间:2020-03-29 22:39:58    阅读次数:171
tf.strided_slice_and_tf.fill_and_tf.concat
tf.strided_slice,tf.fill,tf.concat使用实例 其中,我们需要对tensor data进行切片,tf.strided_slice使用方法请参考 import tensorflow as tf import os os.environ['TF_CPP_MIN_LOG_LE ...
分类:其他好文   时间:2020-03-25 23:22:29    阅读次数:76
tf.nn.l2_loss()的用法
l2_loss()这个函数的作用是利用L2范数来计算张量的误差值,但是没有开发并且只取L2范数的值的一半 函数: tf.nn.l2_loss( t, name=None ) 参数: t:一个张量(tensor),类型可以为:half, bfloat16, float32, float64 name: ...
分类:其他好文   时间:2020-03-23 14:59:27    阅读次数:102
tf.reverse()
一 函数原型tf.reverse( tensor, axis, name=None) 参数: tensor:需要进行反转的张量,类型必须为其中的一个uint8, int8, uint16, int16, int32, int64, bool, bfloat16, half, float32, flo ...
分类:其他好文   时间:2020-03-22 19:50:54    阅读次数:83
AttributeError: module 'tensorflow.python.keras.backend' has no attribute 'get_graph'处理办法
原因:安装的tensorflow版本和keras版本不匹配,只需卸载keras,重新安装自己tensorflow对应的版本。 Keras与tensorflow版本匹配查询网站 ...
分类:编程语言   时间:2020-03-21 12:47:30    阅读次数:133
Tensorflow学习:(一)tensorflow框架基本概念
一、Tensorflow基本概念 1、使用图(graphs)来表示计算任务,用于搭建神经网络的计算过程,但其只搭建网络,不计算 2、在被称之为会话(Session)的上下文(context)中执行图 3、使用张量(tensor)表示数据,用“阶”表示张量的维度。关于这一点需要展开一下 0阶张量称为标 ...
分类:其他好文   时间:2020-03-20 22:31:33    阅读次数:77
tf.nn.embedding_lookup
1.tf.nn.embedding_lookup用来选取张量里对应的索引元素 %tensorflow_version 2.x import tensorflow as tf p=tf.Variable(tf.random.uniform([10,1])) b=tf.nn.embedding_look ...
分类:其他好文   时间:2020-03-19 21:27:11    阅读次数:75
Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow ——Chapter 2
本部分展示一个ML项目,假设是一家房地产公司的新聘数据科学家。下面是这个项目的步骤: 看大图 获取数据 发现和可视化数据以获得见解 准备用于机器学习算法的数据 选择一个模型并进行训练 微调您的模型 介绍您的解决方案 启动,监视和维护系统。 在学习机器学习时,最好尝试使用真实数据而不是人工数据集。本部 ...
分类:系统相关   时间:2020-03-19 09:36:51    阅读次数:96
TensorFlow 可视化中间卷积层
TensorFlow 可视化中间卷积层图像方法 主要函数 tf.summary.image(name, tensor, max_outputs=3, collections=None, family=None) 参数解析 name:A name for the generated node. Wil... ...
分类:其他好文   时间:2020-03-17 21:01:57    阅读次数:88
809条   上一页 1 ... 11 12 13 14 15 ... 81 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!