机器学习
文章平均质量分 80
好清闲
编程爱好者
展开
-
Tensorflow 实现线性回归
import matplotlib.pyplot as plt;import numpy as np;import tensorflow as tf;class LinearRegression: def __init__(self,datalength=1000,w=2,b=0.5): self.length = datalength; self....原创 2018-05-24 17:15:16 · 622 阅读 · 0 评论 -
Tensorflow实现逻辑回归
1. 代码实现:import numpy as np;import matplotlib.pyplot as plt;import tensorflow as tf;DATA_FILE1 = "./data1.txt";class LogicRegression: def sigmoid(self,z): return 1/(1+np.exp(-z)); d...原创 2018-05-24 17:13:12 · 420 阅读 · 0 评论 -
Tensorflow with Batch normalization
import tensorflow as tffrom tensorflow.examples.tutorials.mnist import input_dataclass BNMnist: def __init__(self): print ("initialize......") self.epoches = 1000 self.ba...原创 2018-05-25 15:47:56 · 374 阅读 · 0 评论 -
TensorFLow 加载VGG19 模型并进行预测
import tensorflow as tfimport scipy.ioimport numpy as npimport cv2#download from here http://www.vlfeat.org/matconvnet/models/beta16/imagenet-vgg-verydeep-19.matDEFAULT_PATH="./imagenet-vgg-very...原创 2018-05-24 17:06:59 · 4278 阅读 · 2 评论 -
DNN实现MNIST手写数字识别
Pythonimport tensorflow as tf;from tensorflow.examples.tutorials.mnist import input_dataclass DNNMnist: def __init__(self): self.batch_size = 100; self.epoches = 10000; ...原创 2018-05-24 18:46:28 · 1970 阅读 · 0 评论 -
Slim Load VGG net
import sysimport ossys.path.append("C:\\Users\\kuiw\\Desktop\\workspace\\python\\tf\\models\\research\\slim")from datasets import dataset_utilsfrom nets import vggfrom preprocessing import vgg_p...原创 2018-06-19 15:30:34 · 1018 阅读 · 0 评论