首页
Python
Java
IOS
Andorid
NodeJS
JavaScript
HTML5
【
吴裕雄 python 数据处理(1)
】的更多相关文章
吴裕雄 python 数据处理(3)
import time a = time.time()print(a)b = time.localtime()print(b)c = time.strftime("%Y-%m-%d %X",time.localtime())print(c)d = time.mktime(time.localtime())print(d)e = time.strftime("%Y-%m-%d %X",time.localtime(1544103564.0))print(e) impo…
吴裕雄 python 数据处理(2)
import pandas as pd data = pd.read_csv("F:\\python3_pachongAndDatareduce\\data\\pandas data\\hz_weather.csv")print(data.head())a = data.stack()print(a)b = a.unstack()print(b) import pandas as pd data = pd.read_csv("F:\\python3_pachongAndDat…
吴裕雄 python 数据处理(1)
import time print(time.time())print(time.localtime())print(time.strftime('%Y-%m-%d %X',time.localtime())) 绘图显示中文配置 import matplotlib.pyplot as plt a = [1,1,2,3]b = [2,2,2,2]plt.plot(a,b)plt.title("天生自然")plt.show() import pandas as pd df = pd.rea…
吴裕雄 python 神经网络——TensorFlow 输入数据处理框架
import tensorflow as tf files = tf.train.match_filenames_once("E:\\MNIST_data\\output.tfrecords") filename_queue = tf.train.string_input_producer(files, shuffle=False) # 读取文件. reader = tf.TFRecordReader() _,serialized_example = reader.read(filen…
吴裕雄 python神经网络 花朵图片识别(10)
import osimport numpy as npimport matplotlib.pyplot as pltfrom PIL import Image, ImageChopsfrom skimage import color,data,transform,io #获取所有数据文件夹名称fileList = os.listdir("F:\\data\\flowers")trainDataList = []trianLabel = []testDataList = []testLa…
吴裕雄 python神经网络 花朵图片识别(9)
import osimport numpy as npimport matplotlib.pyplot as pltfrom PIL import Image, ImageChopsfrom skimage import color,data,transform,io #获取所有数据文件夹名称fileList = os.listdir("F:\\data\\flowers")trainDataList = []trianLabel = []testDataList = []testLa…
吴裕雄 python 神经网络——TensorFlow pb文件保存方法
import tensorflow as tf from tensorflow.python.framework import graph_util v1 = tf.Variable(tf.constant(1.0, shape=[1]), name = "v1") v2 = tf.Variable(tf.constant(2.0, shape=[1]), name = "v2") result = v1 + v2 init_op = tf.global_varia…
吴裕雄 python 神经网络——TensorFlow 花瓣分类与迁移学习(4)
# -*- coding: utf-8 -*- import glob import os.path import numpy as np import tensorflow as tf from tensorflow.python.platform import gfile import tensorflow.contrib.slim as slim import tensorflow.contrib.slim.python.slim.nets.inception_v3 as inceptio…
吴裕雄 python 神经网络——TensorFlow 花瓣分类与迁移学习(3)
import glob import os.path import numpy as np import tensorflow as tf from tensorflow.python.platform import gfile import tensorflow.contrib.slim as slim # 因为slim.nets包在 tensorflow 1.3 中有一些问题,所以这里为了方便 # 我们将slim.nets.inception_v3中的代码拷贝到了同一个文件夹下. # imp…
吴裕雄 python 神经网络——TensorFlow 花瓣分类与迁移学习(2)
import glob import os.path import numpy as np import tensorflow as tf from tensorflow.python.platform import gfile # 原始输入数据的目录,这个目录下有5个子目录,每个子目录底下保存这属于该 # 类别的所有图片. INPUT_DATA = 'F:\\TensorFlowGoogle\\201806-github\\datasets\\flower_photos\\' # 输出文件地址…