随笔分类 -  深度学习&机器学习&机器学习 / 深度学习-TensorFlow

摘要:Keras != tf.keras ▪ datasets ▪ layers ▪ losses **▪ metrics(主要)** ▪ optimizers # 1 Keras.Metrics 1.Metrics(新建一个Matrics) 2.update_state(添加数据) 3.result() 阅读全文
posted @ 2023-06-19 00:44 lipu123 阅读(64) 评论(0) 推荐(0)
摘要:一.数据的加载: ``` (x, y), (x_test, y_test) = datasets.fashion_mnist.load_data() print(x.shape, y.shape) ``` ![image](https://img2023.cnblogs.com/blog/19141 阅读全文
posted @ 2023-06-18 17:45 lipu123 阅读(33) 评论(0) 推荐(0)
摘要:首先这个是链式法则: ![image](https://img2023.cnblogs.com/blog/1914163/202306/1914163-20230618150258630-379278443.png) ![image](https://img2023.cnblogs.com/blog 阅读全文
posted @ 2023-06-18 15:31 lipu123 阅读(44) 评论(0) 推荐(0)
摘要:![image](https://img2023.cnblogs.com/blog/1914163/202306/1914163-20230618143224466-131314557.png) # 1 Basic Rule ![image](https://img2023.cnblogs.com/ 阅读全文
posted @ 2023-06-18 15:01 lipu123 阅读(16) 评论(0) 推荐(0)
摘要:# 1 单输出感知机 ![image](https://img2023.cnblogs.com/blog/1914163/202306/1914163-20230618131306306-350372722.png) ![image](https://img2023.cnblogs.com/blog 阅读全文
posted @ 2023-06-18 14:16 lipu123 阅读(37) 评论(0) 推荐(0)
摘要:# 1 梯度下降简介 ## 1.1 什么是梯度下降 ![image](https://img2023.cnblogs.com/blog/1914163/202306/1914163-20230617213114099-1826567435.png) 梯度是一个向量 ![image](https:// 阅读全文
posted @ 2023-06-18 00:42 lipu123 阅读(80) 评论(0) 推荐(0)
摘要:▪ MSE ▪ Cross Entropy Loss(针对分类问题) ▪ Hinge Loss ![image](https://img2023.cnblogs.com/blog/1914163/202306/1914163-20230617164108526-1325568515.png) # 1 阅读全文
posted @ 2023-06-17 17:10 lipu123 阅读(160) 评论(0) 推荐(0)
摘要:这里的输出方式有这几种: ![image](https://img2023.cnblogs.com/blog/1914163/202306/1914163-20230617151543706-2043333171.png) # 1 𝑦∈𝑅^d ▪ linear regression(线性回归) 阅读全文
posted @ 2023-06-17 16:39 lipu123 阅读(25) 评论(0) 推荐(0)
摘要:▪ Matmul ▪ Neural Network ▪ Deep Learning ▪ Multi-Layer # 1.Matmul - out=f(x@w+b) - out=relu(x@w+b) ![image](https://img2023.cnblogs.com/blog/1914163/ 阅读全文
posted @ 2023-06-17 15:08 lipu123 阅读(125) 评论(0) 推荐(0)
摘要:# 1 数据集加载 1.karas.datasets(数据加载) 2.tf.data.Dataset.from_tensor_slices(加载成tensor) - shuffle - map - batch - repeat # 2 tf.keras.datasets() ![image](htt 阅读全文
posted @ 2023-06-17 11:25 lipu123 阅读(81) 评论(0) 推荐(0)
摘要:# 1 合并和分割 ▪ tf.concat 拼接 ▪ tf.split 分割 ▪ tf.stack 堆叠 ▪ tf.unstack ## 1.1 concat(拼接) >tf.concat([a,b,....],axis=) 这个就是a,b按照第axis维进行合并,注意,比如说在第1维度进行合并的话 阅读全文
posted @ 2023-06-17 00:47 lipu123 阅读(64) 评论(0) 推荐(0)
摘要:在前面已经学习了: What we have learned ▪ create tensor ▪ indexing and slices ▪ reshape and broadcasting ▪ math operations 现在用tensorFlow做一个前向传播的一个小实战: ![image] 阅读全文
posted @ 2023-06-16 16:26 lipu123 阅读(27) 评论(0) 推荐(0)
摘要:# 1 TesorFlow的数据结构 **list** :[1,1.2,'Hello',(1,2)] ,这个list里面什么都可以存储,但是如果存储一个图片[64,32,32,3]里面全是数字的话,大小会很大,所以引入np.array **np.array** :可以很方便的做一些同类型的数据的运算 阅读全文
posted @ 2023-06-15 22:25 lipu123 阅读(45) 评论(0) 推荐(0)
摘要:# step 0 数据的导入和加载 ``` (x, y), (x_val, y_val) = datasets.mnist.load_data() x = tf.convert_to_tensor(x, dtype=tf.float32) / 255. y = tf.convert_to_tenso 阅读全文
posted @ 2023-06-15 16:36 lipu123 阅读(22) 评论(0) 推荐(0)
摘要:# 1 数据集 ![image](https://img2023.cnblogs.com/blog/1914163/202306/1914163-20230614214043097-1402159402.png) 使用灰度图片处理,每一张图片大小都标准化为一个28行,28列,每一个像素点的灰度值是0 阅读全文
posted @ 2023-06-15 00:26 lipu123 阅读(47) 评论(0) 推荐(0)
摘要:# 1 线性回归 就是给你一堆数据`[[x0,y0],[x1,y1],[x2,y2] [xn,yn]]`然后得出一个y=wx+b来,这里我们引入损失函数loss=$\sum$(w*xi+b-yi)^2,然后我们就是最小化这个loss从而使得w'*x+b'->y ![image](https://im 阅读全文
posted @ 2023-06-14 21:34 lipu123 阅读(24) 评论(0) 推荐(0)
摘要:# 1 安装CUDA 博主在安装CUDA的时候安装了一个比自己显卡驱动高一个版本的CUDA,之后这个高版本的CUDA就把我的显卡驱动给更新了,电脑和显卡驱动不适配,然后电脑黑屏了,就是进入系统就黑屏了,最后还是进入安全模式之后卸载了显卡驱动之后解决了。所以我们再安装CUDA的时候一定要看清楚自己显卡 阅读全文
posted @ 2023-06-14 11:20 lipu123 阅读(352) 评论(0) 推荐(0)