Tensorflow所遇坑
TensorFlow问题:
1、FLAGS._parse_flags()报错AttributeError:_parse_flags
解决:
因为TensorFlow的版本问题了,TensorFlow版本升级后,它就无情的抛弃了FLAGS._parse_flags()这种用法,改成了用FLAGS.flag_values_dict()
2、raise ValueError("Shapes %s and %s are incompatible" % (self, other))
ValueError: Shapes (3, ?, 1, 1, 128) and () are incompatible
解决:
concated = tf.concat(1, [indices, sparse_labels])改为:
concated= tf.concat([indices, sparse_labels], 1)
3、WARNING:softmax_cross_entropy_with_logits (from tensorflow.python.ops.nn_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Future major versions of TensorFlow will allow gradients to flow
into the labels input on backprop by default.
See tf.nn.softmax_cross_entropy_with_logits_v2.
解决:
将tf.nn.softmax_cross_entropy_with_logits改为:
tf.nn.softmax_cross_entropy_with_logits_v2
4.ValueError: Only call `softmax_cross_entropy_with_logits` with named arguments (labels=..., logits=..., ...)
解决:
将cross_entropy2=tf.reduce_sum(tf.nn.softmax_cross_entropy_with_logits_v2(logits, y_))改为:
cross_entropy2=tf.reduce_sum(tf.nn.softmax_cross_entropy_with_logits_v2(labels=logits, logits=y_))
Tensorflow所遇坑的更多相关文章
- redis 集群 遇坑1
redis 集群 遇坑1 redis集群需要开2个端口 一个是客户端连接端口 一个是 集群总线端口 集群总线端口 是 客户端端口 + 10000 如 客户端端口是 6380 则集群总线端口 为 163 ...
- SpringCache实战遇坑
1. SpringCache实战遇坑 1.1. pom 主要是以下两个 <dependency> <groupId>org.springframework.boot</g ...
- 浅谈Android Studio3.0更新之路(遇坑必入)
>可以参考官网设置-> 1 2 >> Fantasy_Lin_网友评论原文地址是:简书24K纯帅豆写的我也更新一下出处[删除]Fa 转自脚本之家 浅谈Android Studi ...
- Cat搭建遇坑记
1. Cat搭建遇坑记 1.1. 报错 服务端启动 Unable to get component: class com.dianping.cat.analysis.TcpSocketReceiver ...
- Windows环境下Anaconda安装TensorFlow的避坑指南
最近群里聊天时经常会提到DL的东西,也有群友在学习mxnet,但听说坑比较多.为了赶上潮流顺便避坑,我果断选择了TensorFlow,然而谁知一上来就掉坑里了…… 我根据网上的安装教程,默认安装了最新 ...
- tensorflow安装排坑笔记
由于项目需求,得用tensorflow完成,只能将mxnet的学习先放在一边,开始用tensorflow,废话不多说 首先安装anaconda+vs2015+cuda8.0+cudnn6.0 首先安装 ...
- TensorFlow走过的坑之---数据读取和tf中batch的使用方法
首先介绍数据读取问题,现在TensorFlow官方推荐的数据读取方法是使用tf.data.Dataset,具体的细节不在这里赘述,看官方文档更清楚,这里主要记录一下官方文档没有提到的坑,以示" ...
- Windows安装Scrapy遇坑解决办
PS: Windows真心不适合开发.且行且珍惜.... 坑: error: Setup script exited with error: Microsoft Visual C++ 9.0 is r ...
- Java之戳中痛点 - (6)避免类型自动转换,例如两个整数相除得浮点数遇坑
先来看一个例子: package com.test; public class calculate { /** * 光速30万公里/秒 */ public static final int LIGHT ...
随机推荐
- c# log4net安装时在AssemblyInfo中提示找不到log4net解决办法
在安装log4net时,按照安装手册需要在AssemblyInfo.cs里添加log4net的配置信息 [assembly: log4net.Config.XmlConfigurator(Config ...
- python 写入JSON中文乱码解决方法
在将一个字典添加入json中时多加入一个参数就可以了 json.dumps(dict(item), ensure_ascii=False) 例子 with open('zh-cn.json','w', ...
- Delphi 控制程序的执行
- python、第四篇:记录相关操作
一 介绍 MySQL数据操作: DML ======================================================== 在MySQL管理软件中,可以通过SQL语句中的 ...
- c++ 递归算法实现排列组合
通过引用的方式来传值,具体的实现的方法如下 void pc(int m,int n,int &position,int (&a)[100]) { //如果运算得到那个数 if (pos ...
- 13 Zabbix4.4.1系统告警“More than 75% used in the configuration cache”
点击返回:自学Zabbix之路 点击返回:自学Zabbix4.0之路 点击返回:自学zabbix集锦 13 Zabbix4.4.1系统告警“More than 75% used in the conf ...
- https://github.com/zabbix/zabbix-docker 安装
docker-compose -f ./docker-compose_v3_centos_mysql_latest.yaml up -d 解压文件,运行即可
- 面试题:Dubbo中zookeeper做注册中心,如果注册中心集群全都挂掉,发布者和订阅者之间还能通信么?
1.[提供者]在[启动]时,向注册中心zk [注册]自己提供的服务. 2.[消费者]在[启动]时,向注册中心zk [订阅]自己所需的服务. 可以的,消费者在启动时,消费者会从zk拉取注册的生产者的 ...
- vue中前进刷新、后退缓存方案收集
来源掘金: https://juejin.im/post/5b2ce07ce51d45588a7dbf76 来源博客园 https://www.cnblogs.com/wonyun/p/8763314 ...
- hiho #1062 : 最近公共祖先·一(树,最近祖先)
#1062 : 最近公共祖先·一 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 小Ho最近发现了一个神奇的网站!虽然还不够像58同城那样神奇,但这个网站仍然让小Ho乐在 ...