![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
TensorFlow学习记录
TensorFlow学习记录
前额皮质
这个作者很懒,什么都没留下…
展开
-
TensorFlow学习记录(九)---人工神经网络经典框架
人工神经网络经典框架原创 2021-12-14 13:58:43 · 1526 阅读 · 0 评论 -
TensorFlow学习记录(八)---实现多层人工神经网络
多层神经网络实现鸢尾花的分类原创 2021-12-14 13:53:17 · 245 阅读 · 0 评论 -
TensorFlow学习记录(七)---实现单层人工神经网络
import tensorflow as tfimport numpy as npimport pandas as pdimport matplotlib.pyplot as plt#加载数据集TRAIN_URL ="http://download.tensorflow.org/data/iris_training.csv"train_path = tf.keras.utils.get_file(TRAIN_URL.split('/')[-1],TRAIN_URL)df_iris_train原创 2021-12-14 13:47:37 · 175 阅读 · 0 评论 -
TensorFlow学习记录(六)---分类问题
一元逻辑线性回归import numpy as npimport matplotlib.pyplot as pltimport tensorflow as tfx = np.array([137.97,104.50,100.00,124.32,79.20,99.00,124.00,114.00,106.69,138.05,53.75,46.91, 68.00,63.02,81.26,86.21])y = np.array([1,1,0,...原创 2021-12-13 09:25:17 · 149 阅读 · 0 评论 -
TensorFlow学习记录(五)---TensorFlow实例
实例:波士顿房价数据集一元线性回归import tensorflow as tfimport numpy as npimport matplotlib.pyplot as plt#加载数据集boston_housing = tf.keras.datasets.boston_housing(train_x,train_y),(test_x,test_y)=boston_housing.load_data()#数据处理x_train = train_x[:,5]y_train = t...原创 2021-12-08 14:29:23 · 306 阅读 · 0 评论 -
TensorFlow学习记录(四)---TensorFlow自动求导机制
一元函数import tensorflow as tfx = tf.Variable(3.)with tf.GradientTape(persistent=True) as tape: y = tf.square(x) z = tf.pow(x,3)dy_dx = tape.gradient(y,x)dz_dx = tape.gradient(z,x)print(y)print(dy_dx)print(z)print(dz_dx)del tape #使用完之后手动释放原创 2021-12-08 14:26:23 · 1309 阅读 · 0 评论 -
TensorFlow学习记录(四)---梯度下降法之多元线性回归
import numpy as npimport matplotlib.pyplot as pltarea = np.array([137.97,104.50,100.00,124.32,79.20,99.00,124.00,114.00,106.69,138.05,53.75,46.91, 68.00,63.02,81.26,86.21])price = np.array([145.00,110.00,93.00,116.00,65.32,104.0...原创 2021-12-08 14:23:29 · 183 阅读 · 0 评论 -
TensorFlow学习记录(三)---梯度下降法之一元线性回归
import numpy as npimport matplotlib.pyplot as pltx = np.array([137.97,104.50,100.00,124.32,79.20,99.00,124.00,114.00,106.69,138.05,53.75,46.91, 68.00,63.02,81.26,86.21])y = np.array([145.00,110.00,93.00,116.00,65....原创 2021-12-07 12:35:48 · 117 阅读 · 0 评论 -
TensorFlow学习记录(二)---回归
原创 2021-12-07 12:29:56 · 168 阅读 · 0 评论 -
TensorFlow学习记录(一)---张量
import tensorflow as tfimport numpy as npna = np.arange(12).reshape(3,4)ta= tf.convert_to_tensor(na)print(type(na))print(type(ta))import tensorflow as tfimport numpy as npa= tf.constant(np.arange(12).reshape(3,4))print(a)b=tf.split(a,[2,...原创 2021-12-07 12:28:41 · 66 阅读 · 0 评论