tensorflow o. 到 tensorflow 1. 部分改变
一下内容为笔者实际应用中遇到的问题,可能(必须)不全,后面会持续更新。
(1) tf.nn.run_cell 改为 tf.contrib.rnn
(2) tf.reduce_mean 改为 tf.reduce.sum
(3) tf.nn.seq2seq.sequence_loss_by_example 改为
tf.contrib.legacy_seq2seq.sequence_loss_by_example
(4) tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logit(y,y_)) 改为
tf.reduce_sum(tf.nn.softmax_cross_entropy_with_logit(logits=logits,labels=y_))
(5) tf.train.SummaryWriter 改为: tf.summary.FileWriter
(6) tf.merge_all_summary() 改为: tf.summary.merge_all()
(7) tf.histogram_summary() 改为: tf.summary.histogram()
(8) tf.scalar_summary() 改为: tf.summary.scalar()
(9) tf.image_summary() 改为: tf.summary.image()
(10) tf.concat(1,[indices,sparse_labels]) 改为: tf.concat([indices,sparse_labels],1)
(11) TypeError: Using a `tf.Tensor` as a Python `bool` is not allowed. Use `if t is not None:` instead of `if t:` to test if a tensor is defined, and use TensorFlow ops such as tf.cond to execute subgraphs conditioned on the value of a tensor.
if grad: 改为 if grad is not None:
tensorflow o. 到 tensorflow 1. 部分改变的更多相关文章
- 移动端目标识别(1)——使用TensorFlow Lite将tensorflow模型部署到移动端(ssd)之TensorFlow Lite简介
平时工作就是做深度学习,但是深度学习没有落地就是比较虚,目前在移动端或嵌入式端应用的比较实际,也了解到目前主要有 caffe2,腾讯ncnn,tensorflow,因为工作用tensorflow比较多 ...
- [Tensorflow] Practice - The Tensorflow Way
该系列主要是<Tensorflow 实战Google深度学习框架 >阅读笔记:有了Cookbook的热身后,以这本书作为基础形成个人知识体系. Ref: [Tensorflow] Cook ...
- TensorFlow应用实战 | TensorFlow基础知识
挺长的~超出估计值了~预计阅读时间20分钟. 从helloworld开始 mkdir 1.helloworld cd 1.helloworldvim helloworld.py 代码: # -*- c ...
- 移动端目标识别(3)——使用TensorFlow Lite将tensorflow模型部署到移动端(ssd)之Running on mobile with TensorFlow Lite (写的很乱,回头更新一个简洁的版本)
承接移动端目标识别(2) 使用TensorFlow Lite在移动设备上运行 在本节中,我们将向您展示如何使用TensorFlow Lite获得更小的模型,并允许您利用针对移动设备优化 ...
- 移动端目标识别(2)——使用TENSORFLOW LITE将TENSORFLOW模型部署到移动端(SSD)之TF Lite Developer Guide
TF Lite开发人员指南 目录: 1 选择一个模型 使用一个预训练模型 使用自己的数据集重新训练inception-V3,MovileNet 训练自己的模型 2 转换模型格式 转换tf.GraphD ...
- TensorFlow+Keras 03 TensorFlow 与 Keras 介绍
1 TensorFlow 架构图 1.1 处理器 TensorFlow 可以在CPU.GPU.TPU中执行 1.2 平台 TensorFlow 具备跨平台能力,Windows .Linux.Andro ...
- [Tensorflow] **Android Meets TensorFlow
TensorFlow Dev Summit 2017 From: Android Meets TensorFlow: How to Accelerate Your App with AI (Googl ...
- 使用TensorFlow Serving优化TensorFlow模型
使用TensorFlow Serving优化TensorFlow模型 https://www.tensorflowers.cn/t/7464 https://mp.weixin.qq.com/s/qO ...
- tensorflow兼容处理 tensorflow.compat.v1
https://www.wandouip.com/t5i183316/ 引言 原来引用过一个段子,这里还要再引用一次.是关于苹果的.大意是,苹果发布了新的开发语言Swift,有非常多优秀的特征,于是很 ...
- 最简单的 TensorFlow 代码,TensorFlow Hello World 。
# -*- coding:utf-8 -*- from __future__ import print_function ''' HelloWorld example using TensorFlow ...
随机推荐
- 算法实践--最长公共子序列(Longest Common Subsquence)
什么是最长公共子序列 X=ACCG Y=CCAGCA 长度为1的公共子序列: {A} {C} {G} 长度为2的公共子序列:{AC} {CC} {CG} {AG} 长度为3的公共子序列:{ACG} 长 ...
- Prometheus介绍
Prometheus的主要特点 Prometheus 属于一站式监控告警平台,依赖少,功能齐全.Prometheus 支持对云的或容器的监控,其他系统主要对主机监控.Prometheus 数据查询语句 ...
- windows配置远程桌面连接到ubuntu
最近在用nodejs开发项目,同时也在做一些区块链相关的工作,公司给配的办公电脑着实不错,都是自家品牌的工作站,市场价都是15K+了.但是在win10上装虚拟机,还是不太顺畅的.因为公司电脑是五年到期 ...
- mysqli字符编码
mysqli 字符编码: 汉字编码: 1.gbk 最久的编码格式,不能写繁体: 2.国内的gb2312: 3.国际的标准:utf-8; 查看数据库的字符编码: show variables like ...
- Python日志模块logging&JSON
日志模块的用法 json部分 先开一段测试代码:注意 str可以直接处理字典 eval可以直接将字符串转成字典的形式 dic={'key1':'value1','key2':'value2'} ...
- MySQL数据库的库表基本操作
一.库操作 1.创建业务数据库 DDL 数据库命名规则:区分大小写.唯一性.不能使用关键字如 create select.不能单独使用数字 语法:CREATE DATABASE 数据库名; CREAT ...
- 如何使用jQuery从字符串中删除最后一个字符
如何使用jQuery从字符串中删除最后一个字符 1.string.slice(0,-1) 2.str.substring(0,str.length-1)
- VUE图片懒加载-vue lazyload插件的简单使用
序:vue项目时候,我们要对图片进行懒加载处理,这个开发项目中就不需要自己去写了,因为比较方便使用vue lazyload进行处理,高效率开发 一. vue lazyload插件: 插件地址:http ...
- linux 查看任务运行时间
ps -eo pid,tty,user,comm,lstart,etime | grep pid 15590 ? meicai java Wed Sep 26 20:04:31 2018 35-15: ...
- git上传文件到coding
一.上传文件到coding:1.远程连接coding,下载远程仓库到本地git clone https://git.coding.net/wanghao_1/besttest_syz.git 2.cd ...