一.这里列出了tensorflow的一些基本函数,比较全面:https://blog.csdn.net/M_Z_G_Y/article/details/80523834 二.这里是tensortflow的详细教程:http://c.biancheng.net/tensorflow/ 三.下面程序是我学习常量.变量.placeholder和基本运算时形成的小函数 import tensorflow as tf import numpy as np print(tf.__version__)#打印T…
TensorFlow 中可以通过三种方式读取数据: 一.通过feed_dict传递数据: input1 = tf.placeholder(tf.float32) input2 = tf.placeholder(tf.float32) output = tf.multiply(input1, input2) with tf.Session() as sess: feed_dict={input1: [[7.,2.]], input2: [[2.],[3.]]} print(sess.run(out…
一.在代码中标记要显示的各种量 tensorboard各函数的作用和用法请参考:https://www.cnblogs.com/lyc-seu/p/8647792.html import tensorflow as tf import numpy as np import matplotlib.pyplot as plt import os #设置当前工作目录 os.chdir(r'H:\Notepad\Tensorflow') def add_layer(inputs, in_size, ou…
参考网站:http://www.tensorfly.cn/tfdoc/tutorials/mnist_beginners.html #自动下载并加载数据 from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets("MNIST_data/", one_hot=True) #构建计算图 import tensorflow as tf x = tf.placehol…
#自动下载并加载数据 from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets("MNIST_data/", one_hot=True) import tensorflow as tf # truncated_normal: https://www.cnblogs.com/superxuezhazha/p/9522036.html def weight_var…
位:二进制中,每个0或1就是一个位,叫做bit(比特) 字节:计算机最小是存储单元(byte或B) 8bit = 1B 常用cmd命令: 启动: Win+R,输入cmd回车切换盘符 盘符名称:进入文件夹 cd 文件夹名称进入多级文件夹 cd 文件夹1\文件夹2\文件夹3返回上一级 cd ..直接回根路径 cd \查看当前内容 dir清屏 cls退出 exit JDK与JRE JRE:java运行环境 JDK:Java开发环境 关系:JDK包含JRE,JRE包含JVM cmd模式运行java环境…
这个bug的解决办法: # from tensorflow.keras import datasets, layers, models from tensorflow.python.keras import datasets, layers, models 在tensorflow和Keras中间插入python,可能是因为tensorflow版本问题(我的版本是1.7.0),Keras的目录是   ~\tensorflow\python\keras,而非 ~\tensorflow\keras…
基本信息 官网:http://www.cs.toronto.edu/~kriz/cifar.html 共60000张图片:50000张用于训练.10000张用于测试 图片大小为:32X32 数据集图片分为10类:每类6000张 数据集下载解压后的目录结构: 读取.打印和保存数据集中指定的图片: import pickle import matplotlib.pyplot as plt CIFAR_DIR ="cifar10_data/cifar-10-batches-bin/data_batch…
这个bug的解决办法: import cv2 # scipy.misc.toimage(image_array).save('cifar10_data/raw/%d.jpg' % i) cv2.imwrite('cifar10_data/raw/%d.jpg' % i,image_array) 用  cv2.imwrite  代替   scipy.misc.toimage 如果没有安装cv2 ,请用如下命令安装:pip install opencv-python -i https://pypi.…
1.tensorflow常量变量的定义 测试代码如下: # encoding:utf-8 # OpenCV tensorflow # 类比 语法 api 原理 # 基础数据类型 运算符 流程 字典 数组 import tensorflow as tf # data1 = tf.constant(2.5) # 定义常量 data1 = tf.constant(2, dtype=tf.int32) # 改变常量类型 data2 = tf.Variable(10, name='var') # 定义变量…