1. Intro
-
ML和DL的本质essence是获取数据,构建算法(如神经网络)来发现
其中的模式pattern,并使用发现的模式来预测未来predict future;
import torch
# nn contain all pytorch building block for neural network
from torch import nn
import matplotlib.pyplot as plt
# check PyTorch version
torchVersion = torch.__version__
what_were_covering = {1: "data (prepare and load)",
2: "build model",
3: "fitting the model to data (training)",
4: "making predictions and evaluating a model (inference)",
5: "saving and loading a model",
6: "putting it all together"
}
torchVersion,what_were_covering
3. Building Model
-
构建模型:来学习数据中的模式,还将选择损失函数、优化器并建立训练循环;
-
to learn pattern in data,also choose loss function,
optimizer and build training loop;
4. Fitting Model
-
将模型与数据拟合(训练),有数据和模型后,让模型(尝试)在(训练)数据中找到模式;
-
fitting model to data (training),get data and model,
let model(try to) find pattern in (training) data;
5. Prediction Evaluating
-
预测和评估模型(推理),模型在数据中发现的模式,将其发现与实际(测试)数据比较;
-
making prediction and evaluating model (inference),model found
pattern in data,compare its finding to actual (testing) data;