![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
tensorflow
水月灯花
python、小程序、网站都会做,可以帮忙哦!
展开
-
TensorFlow出现错误:ValueError: Dimensions must be equal, but are 32 and 3 for add (op: Add) with
使用tensorflow在训练神经网络中出现错误:ValueError: Dimensions must be equal, but are 784 and 10 for 'add' (op: 'Add') with input shapes: [784,784], [10].出现这种错误一般就是输入,输出矩阵,和 tf.matmul(weight, x) + bias 计算中矩阵不能相乘所造成的matmul(weight, x)函数表示行数为weight,列数为x的矩阵#定义两个pl..原创 2020-05-17 23:13:08 · 15870 阅读 · 0 评论 -
使用tensorflow对多维矩阵进行转置,并取出矩阵转置之后的值
1、矩阵转置,使用tf.transpose() 函数,使用说明如下:一个二维张量x,初始情况下轴的排列为(0,1),perm=[1, 0],意味着新矩阵中 [轴0变为轴1,轴1变为轴0].x = tf.constant([[1, 2, 3], [4, 5, 6]]) #[[1, 4]#[2, 5] # [3, 6]]相当于: tf.transpose(x, perm=[1, 0]) #[[1, 4] # [2, 5] # [3, 6]] tf.transpose(x)..原创 2020-05-17 22:54:47 · 1027 阅读 · 0 评论 -
tensorflow 2.0中相比tensorflow 1.0踩过的坑
tensorflow1.x升级到2.x出现错误:AttributeError: module 'tensorflow' has no attribute 'get_variable'AttributeError: module 'tensorflow' has no attribute 'placeholder'AttributeError: module 'tensorflow' has ...原创 2020-04-28 22:33:23 · 894 阅读 · 0 评论 -
TensorFlow简要教程及线性回归算法示例
TensorFlow是谷歌推出的深度学习平台,目前在各大深度学习平台中使用的最广泛。一、安装命令pip3 install -U tensorflow --default-timeout=1800 -i https://mirrors.ustc.edu.cn/pypi/web/simple上面是不支持GPU的版本,支持GPU版本的安装命令如下pip3 install -U tenso...转载 2020-04-27 22:11:09 · 405 阅读 · 0 评论 -
Tensorflow安装在导入模块时会出现ImportError: DLL load failed: 找不到指定的模块的问题
我重装了annaconda,降低了tensorflow的版本,都不能解决这个错误,我电脑上Microsoft Visual C++ 2015Redistributable的这个系统软件的,我以为不会出错,结果就是这个的问题这里在安装完tensorflow以后,在导入模块时会出现ImportError: DLL load failed: 找不到指定的模块。具体的解决方法是安装 Micros...原创 2019-07-23 15:14:26 · 4781 阅读 · 1 评论