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. POJ 1063 - Flip and Shift

    Description This puzzle consists of a random sequence of m black disks and n white disks on an oval- ...

  2. [No0000129]WPF(1/7)开始教程[译]

    概要 在我使用了半年多 WPF 后,是时候写点关于 WPF 基础方面的东西了.我发表了一系列针对具体问题的文章.现在是到了让大家明白为什么说WPF是一款在界面开发上带来革命的产品了. 本文针对初级-中 ...

  3. [No0000BB]ReSharper操作指南4/16-配置ReSharper代码快修与导航

    代码问题的快速修复 ReSharper可以帮助您立即修复设计时检测到的大部分代码问题.就像按Alt+Enter突出显示的代码问题一样简单,并选择合适的方法来解决问题或改进次优代码. GIF 应用快速修 ...

  4. 编译安装spark 1.5.x(Building Spark)

    原文连接:http://spark.apache.org/docs/1.5.0/building-spark.html · Building with build/mvn · Building a R ...

  5. transformations 变换集合关系 仿射变换

    http://groups.csail.mit.edu/graphics/classes/6.837/F03/lectures/04_transformations.ppt https://group ...

  6. OCR技术(光学字符识别)

    什么是OCR? OCR英文全称是optical character recognition,中文叫光学字符识别.它是利用光学技术和计算机技术把印在或者写在纸上的 文字读取出来,并转换成一种计算机能够接 ...

  7. nslookup dig iptables,sudoer,jenkins

    [NSLOOKUPm]http://roclinux.cn/?p=2441 nslookup media.ucampus.unipus.cn [DIG]http://roclinux.cn/?p=24 ...

  8. [Day4]Switch语句、数组、二维数组

    1.选择结构switch (1)格式 switch (表达式){ case 目标值1: 执行语句1; break; case 目标值2: 执行语句2; break; ...... case 目标值n: ...

  9. Page11:状态反馈、输出反馈的概念及性能比较,极点配置的基本概念、意义及其算法[Linear System Theory]

    内容包含离散时间线性时不变系统的稳定判据 状态反馈.输出反馈的基本概念及其性能比较 极点配置的基本概念.意义及其算法

  10. linux学习:【第1篇】初识Linux及安装

    狂神声明 : 文章均为自己的学习笔记 , 转载一定注明出处 ; 编辑不易 , 防君子不防小人~共勉 ! linux学习:[第1篇]初识Linux及安装 写在前面 学习之初看了一段文章,很有感触,所以也 ...