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所遇坑的更多相关文章

  1. redis 集群 遇坑1

    redis 集群 遇坑1 redis集群需要开2个端口 一个是客户端连接端口 一个是 集群总线端口 集群总线端口 是 客户端端口 + 10000 如 客户端端口是 6380 则集群总线端口 为 163 ...

  2. SpringCache实战遇坑

    1. SpringCache实战遇坑 1.1. pom 主要是以下两个 <dependency> <groupId>org.springframework.boot</g ...

  3. 浅谈Android Studio3.0更新之路(遇坑必入)

    >可以参考官网设置-> 1 2 >> Fantasy_Lin_网友评论原文地址是:简书24K纯帅豆写的我也更新一下出处[删除]Fa 转自脚本之家 浅谈Android Studi ...

  4. Cat搭建遇坑记

    1. Cat搭建遇坑记 1.1. 报错 服务端启动 Unable to get component: class com.dianping.cat.analysis.TcpSocketReceiver ...

  5. Windows环境下Anaconda安装TensorFlow的避坑指南

    最近群里聊天时经常会提到DL的东西,也有群友在学习mxnet,但听说坑比较多.为了赶上潮流顺便避坑,我果断选择了TensorFlow,然而谁知一上来就掉坑里了…… 我根据网上的安装教程,默认安装了最新 ...

  6. tensorflow安装排坑笔记

    由于项目需求,得用tensorflow完成,只能将mxnet的学习先放在一边,开始用tensorflow,废话不多说 首先安装anaconda+vs2015+cuda8.0+cudnn6.0 首先安装 ...

  7. TensorFlow走过的坑之---数据读取和tf中batch的使用方法

    首先介绍数据读取问题,现在TensorFlow官方推荐的数据读取方法是使用tf.data.Dataset,具体的细节不在这里赘述,看官方文档更清楚,这里主要记录一下官方文档没有提到的坑,以示" ...

  8. Windows安装Scrapy遇坑解决办

    PS: Windows真心不适合开发.且行且珍惜.... 坑: error: Setup script exited with error: Microsoft Visual C++ 9.0 is r ...

  9. Java之戳中痛点 - (6)避免类型自动转换,例如两个整数相除得浮点数遇坑

    先来看一个例子: package com.test; public class calculate { /** * 光速30万公里/秒 */ public static final int LIGHT ...

随机推荐

  1. 在centos7上kvm网卡桥接

    系统环境准备 [root@linux-node1 ~]# cat /etc/redhat-release CentOS Linux release (Core) [root@linux-node1 ~ ...

  2. golang连接activemq,发送接收数据

    介绍 使用golang连接activemq发送数据的话,需要使用一个叫做stomp的包,直接go get github.com/go-stomp/stomp即可 代码 生产者 package main ...

  3. c++实现服务器和多个客户端的实时群聊通信

    我们通过TCP/IP来实现多人聊天室,如果租一个服务器我们就可以实现全网的多人聊天室(不懂tcp/ip的点进来https://www.cnblogs.com/yskn/p/9335608.html)! ...

  4. Centos 7安装部署zabbix 3.0LTS

    1.环境准备 OS:CentOS 7.2 64bit Zabbix版本:3.0.12 MySQL版本:5.6 注意:zabbix3.0相关要求 mysql5.0以上版本.apache1.3以上版本.p ...

  5. ELK是什么?

    ELK = ElasticSearch + Logstash + Kibana  Elasticsearch:后台分布式存储以及全文检索 Logstash :  日志加工.“搬运工” Kibana : ...

  6. 第二章 Vue快速入门-- 19 v-if和v-show的使用和特点

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8&quo ...

  7. POJ3311Hie with the Pie(floyd传递+DP,状态压缩)

    问题 The Pizazz Pizzeria prides itself in delivering pizzas to its customers as fast as possible. Unfo ...

  8. vue 里面异步加载高德地图

    前言 关于Vue 里面使用异步加载高德地图 项目中其实只有几处需要用到地图,不需要全局引入 在index文件中引入js会明显拖慢首屏加载速度,虽然可以使用异步加载script的方式解决,但是始终觉得不 ...

  9. Notepad++设置快捷键及外部命令

    <NotepadPlus> <InternalCommands> <Shortcut id="41020" Ctrl="no" A ...

  10. JavaScript生成随机数的方法

    一,函数 Math.ceil();  //向上取整. Math.floor();  //向下取整. Math.round();  //四舍五入. Math.random();  //0.0 ~ 1.0 ...