1、torch
torch.optim
- BGD(): batch gradient descent
- SGD(): stochastic gradient descent
- MBGD(): mini-batch gradient descent
- Adam()
torch.nn
-
MESLoss(): mean square error,均方误差
-
NLLLoss(): Negative Log Likelihood Loss
-
BCELoss(): Binary Cross Entropy Loss
BCELoss(x, y)
− 1 n ∑ ( y n × ln x n + ( 1 − y n ) × ln ( 1 − x n ) ) -\frac 1 n\sum(y_n \times \ln x_n+(1-y_n) \times \ln(1-x_n)) −n1∑(yn×lnxn+(1−yn)×ln(1−xn))
-
BCEWithLOgitsLoss
-
CrossEntropyLoss():
-
Linear()
-
Sigmoid()
-
relu()
-
Module
torch.nn.functional
- cross_entropy(),交叉损失熵
torch.cuda
- is_available()
torch.utils
- save_image()
torch.utils.data
- TensorDataset
- DataLoader