1、调用tf.softmax_cross_entropy_with_logits函数出错。

#原因是这个函数,不能按以前的方式进行调用了,只能使用命名参数的方式来调用。
#原来是这样的:
tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(y, y_))
#修改成这样的:
tf.reduce_sum(tf.nn.softmax_cross_entropy_with_logits(logits=y, labels=y_))

2、Tensorflow 函数tf.cocat([fw,bw],2)出错:TypeError: Expected int32, got list containing Tensors of type ‘_Message’ instead.

Expected int32, got list containing Tensors of type ‘_Message’ inst
原因是11版本的函数形式为:tf.concat(2,[fw,bw]),即应把串联的维度与串联值位置调换即可.

3、Input ‘split_dim’ of ‘Split’ Op has type float32 that does not match expected type of int32

#原来是这样的:
This is because in Tensorflow versions < 0.12.0 the split function takes the arguments as:
x = tf.split(0, n_steps, x) # tf.split(axis, num_or_size_splits, value) #修改成这样的:
The tutorial you are working from was written for versions > 0.12.0, which has been changed to be consistent with Numpy’s split syntax:
x = tf.split(x, n_steps, 0) # tf.split(value, num_or_size_splits, axis)

4、‘module’ object has no attribute ‘pack’
因为TF后面的版本修改了这个函数的名称,把 tf.pack 改为 tf.stack。

5、The value of a feed cannot be a tf.Tensor object. Acceptable feed values include Python scalars, strings, lists, or numpy ndarrays
数据集是feed输入的,feed的数据格式是有要求的。
解决:img,label = sess.run[img,label], 用返回值。

6、module 'tensorflow.python.ops.nn' has no attribute 'rnn_cell'

#原因是1.0版本改了不少地方啊...
#原来是这样的:
from tensorflow.python.ops import rnn, rnn_cell
lstm_cell = rnn_cell.BasicLSTMCell(rnn_size,state_is_tuple=True)
outputs, states = rnn.rnn(lstm_cell, x, dtype=tf.float32) #修改成这样的:
from tensorflow.contrib import rnn
lstm_cell = rnn.BasicLSTMCell(rnn_size)
outputs, states = rnn.static_rnn(lstm_cell, x, dtype=tf.float32)

7、Variable basic/rnn/basic_lstm_cell/weights does not exist, or was not created with tf.get_variable(). Did you mean to set reuse=None in VarScope?

with tf.variable_scope(scope_name, reuse=None) as scope:
scope.reuse_variables()
w = tf.get_variable("weight", shape, initializer = random_normal_initializer(0., 0.01)))
b = tf.get_variable("biase", shape[-1], initializer = tf.constant_initializer(0.0))
#或:
with tf.variable_scope(scope_name, reuse=True):
w = tf.get_variable("weight")
b = tf.get_variable("biase")

TensorFlow遇到的问题汇总(持续更新中......)的更多相关文章

  1. 《WCF技术剖析》博文系列汇总[持续更新中]

    原文:<WCF技术剖析>博文系列汇总[持续更新中] 近半年以来,一直忙于我的第一本WCF专著<WCF技术剖析(卷1)>的写作,一直无暇管理自己的Blog.在<WCF技术剖 ...

  2. 中国.NET:各地微软技术俱乐部汇总(持续更新中...)

    中国.NET:各地微软技术俱乐部汇总(持续更新中...)   本文是转载文,源地址: https://www.cnblogs.com/panchun/p/JLBList.html by ​史记微软. ...

  3. 痞子衡嵌入式:史上最强i.MX RT学习资源汇总(持续更新中...)

    大家好,我是痞子衡,是正经搞技术的痞子.今天痞子衡给大家介绍的是i.MX RT学习资源. 类别 资源 简介 官方汇总 i.MXRT产品主页 恩智浦官方i.MXRT产品主页,最权威的资料都在这里,参考手 ...

  4. [Linux] Linux指令汇总(持续更新中...)

    写在前面: 以前真心没有玩过Linux系统,总感觉整天摆弄Linux的同学都是大牛.如今,在公司里实习需要远程登录Linux服务器,所有的代码都要在开发板上完成,所以被逼无奈也不得不定下心来好好学学L ...

  5. LeetCode All in One 题目讲解汇总(持续更新中...)

    终于将LeetCode的免费题刷完了,真是漫长的第一遍啊,估计很多题都忘的差不多了,这次开个题目汇总贴,并附上每道题目的解题连接,方便之后查阅吧~ 477 Total Hamming Distance ...

  6. Xcode编译异常和警告汇总(持续更新中)

    1.Method definition for 'xxx' not found xxx的方法没有实现 出现原因.h声明了xxx方法但是.m没有实现xxx方法 解决方法:在类的.m文件实现xxx方法   ...

  7. javascript算法汇总(持续更新中)

    1. 线性查找 <!doctype html> <html lang="en"> <head> <meta charset="U ...

  8. 痞子衡嵌入式:史上最强ARM Cortex-M学习资源汇总(持续更新中...)

    大家好,我是痞子衡,是正经搞技术的痞子.今天痞子衡给大家介绍的是ARM Cortex-M学习资源. 类别 资源 版本 短评 官方汇总 cortex-m-resources / ARM公司专家Josep ...

  9. LeetCode Animation 题目图解汇总(持续更新中...)

    我会尽力将LeetCode上所有的题目都用动画的形式演示出来,期待与你见证这一天! GitHub Repo:LeetCode Animation Follow: MisterBooo · GitHub ...

  10. C++常考面试题汇总(持续更新中)

    c++面试题 一 用简洁的语言描述 c++ 在 c 语言的基础上开发的一种面向对象编程的语言: 应用广泛: 支持多种编程范式,面向对象编程,泛型编程,和过程化编程:广泛应用于系统开发,引擎开发:支持类 ...

随机推荐

  1. Hyper-V 与 VMware 和 vbox 的不兼容

    新装的win10 开始先装到docker 装之前必须要装Hyper-V 后来装vbox 并且安装了Centos7系统也用得起,后来不知道怎么win10好像升级了.再启动vbox 开启centos7就报 ...

  2. imu内参标定

    https://medium.com/@tomas789/iphone-calibration-camera-imu-and-kalibr-33b8645fb0aa how kalibr model ...

  3. rabbitmq简单实例

    JMS组件:activemq(慢)AMQP组件(advance message queue protocol):rabbitmq和kafka 一..消息队列解决了什么问题?异步处理应用解耦流量削锋日志 ...

  4. vsCode配置C++调试环境

    1.下载安装VSCode,安装mscpptools ,直接搜索c++,或者mscpptools 2.下载MinGW 安装好,一般默认安装到C:\MinGW 安装好后直接启动. 选择需要的gcc ,g+ ...

  5. arcgis10.4 server第一次发布地图报错:We were unable to connect to...Error:Proxy server got bad address...

    arcgis 10.4发布地图跟10.2不一样.server url里的http要改为https,否则就会连接不上.

  6. post/get in console of JSarray/js 数组详细操作方法及解析合集

    https://juejin.im/post/5b0903b26fb9a07a9d70c7e0[ js 数组详细操作方法及解析合集 js array and for each https://blog ...

  7. Python库源码学习1:Flask之app.run

    先列出app.run()实现的功能,我们以debug=True的情况下进行分析. 1. web服务器,处理http请求 2. 当代码修改后,重启服务器 那么app.run()是如何实现这两个功能的呢? ...

  8. 使用RegisterNatives注冊原生代码

    在Android开发本地代码时,有两种方式.一种是使用javah生成头文件.然后编辑源码,还有一种不用生成头文件,直接编辑代码后,使用RegisterNatives方法进行注冊,以下是一个Demo: ...

  9. 新辰:共享是SEO的思维 用户是SEO的核心

    大家都知道.SEO一直没有一个能够定义的核心.新辰知道全部的东西里面在互联网领域链接是非常重要的.所以新辰觉得做SEO就是把链接做好.因此,链接对于一个站点来说简单分能够分成两种.内部的链接和外部的链 ...

  10. UnicodeDecodeError异常

    UnicodeDecodeError异常 UnicodeDecodeError: 'utf8' codec can't decode byte 0xb2 in position 154: invali ...