style: html to md syntax

This commit is contained in:
Plumbiu
2023-08-24 10:31:27 +08:00
parent 229e847514
commit 0a96f3658b
88 changed files with 459 additions and 459 deletions

View File

@@ -58,7 +58,7 @@ print(type(img2))
'''
```
首先用读取图片,查看一下图片的类型为 PIL.JpegImagePlugin.JpegImageFile这里需要注意<strong>PIL.JpegImagePlugin.JpegImageFile 类是 PIL.Image.Image 类的子类</strong>。然后,用 transforms.ToTensor() 将 PIL.Image 转换为 Tensor。最后再将 Tensor 转换回 PIL.Image。
首先用读取图片,查看一下图片的类型为 PIL.JpegImagePlugin.JpegImageFile这里需要注意**PIL.JpegImagePlugin.JpegImageFile 类是 PIL.Image.Image 类的子类**。然后,用 transforms.ToTensor() 将 PIL.Image 转换为 Tensor。最后再将 Tensor 转换回 PIL.Image。
## 对 PIL.Image 和 Tensor 进行变换
@@ -202,7 +202,7 @@ display(img2)
标准化是指每一个数据点减去所在通道的平均值再除以所在通道的标准差数学的计算公式output=(inputmean)/std
而对图像进行标准化,就是对图像的每个通道利用均值和标准差进行正则化。这样做的目的,是<strong>为了保证数据集中所有的图像分布都相似,这样在训练的时候更容易收敛,既加快了训练速度,也提高了训练效果</strong>
而对图像进行标准化,就是对图像的每个通道利用均值和标准差进行正则化。这样做的目的,是**为了保证数据集中所有的图像分布都相似,这样在训练的时候更容易收敛,既加快了训练速度,也提高了训练效果**
让我来解释一下:首先,标准化是一个常规做法,可以理解为无脑进行标准化后再训练的效果,大概率要好于不进行标准化。