![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Tensor'flow
Aok1
这个作者很懒,什么都没留下…
展开
-
Tensorflow 1.x学习记录(五):Dropout避免过拟合
from __future__ import print_functionimport tensorflow as tffrom sklearn.datasets import load_digitsfrom sklearn.model_selection import train_test_splitfrom sklearn.preprocessing import LabelBinarizer# load datadigits = load_digits()X = digits.data原创 2021-04-01 16:48:50 · 127 阅读 · 0 评论 -
Tensorflow 1.x学习记录(三):tensorborad的初级应用
import tensorflow as tfimport numpy as npimport matplotlib.pyplot as pltdef add_layer(inputs,in_size,out_size,n_layer,activation_function=None): layer_name = 'layer%s' % n_layer with tf.name_scope(layer_name): with tf.name_scope('weight原创 2021-03-31 22:45:44 · 156 阅读 · 0 评论 -
Tensorflow 1.x学习记录(二):搭建神经网络
import tensorflow as tfdef add_layer(inputs,in_size,out_size,activation_function=None): Weights = tf.Variable(tf.random_normal([in_size,out_size])) #权重需要给随机值,不能给0。 biases = tf.Variable(tf.zeros([1,out_size])+0.1) Wx_plus_b = tf.matmul(inp原创 2021-03-31 22:40:04 · 143 阅读 · 0 评论 -
Tensorflow 1.x学习记录:简单纠错
import tensorflow as tfimport numpy as np#create datax_data = np.random.rand(100).astype(np.float32)y_data = x_data*0.1+0.3#create tensorflow structure startweights = tf.Variable(tf.random_uniform([1],-1.0,1.0))#随机生成均匀分布的范围为(-1,1)的一维数列biases = tf原创 2021-03-29 21:11:21 · 54 阅读 · 0 评论