摘要:
1 导入实验需要的包 import numpy as np import pandas as pd import torch from torch import nn import matplotlib.pyplot as plt from torch.autograd import Variabl 阅读全文
摘要:
Example1: for input, target in dataset: optimizer.zero_grad() output = model(input) loss = loss_fn(output, target) loss.backward() optimizer.step() Ex 阅读全文
摘要:
参考:官方 1. 均匀分布 torch.nn.init.uniform_(tensor, a=0.0, b=1.0) 解释: Fills the input Tensor with values drawn from the uniform distribution $\mathcal{U}(a, 阅读全文
摘要:
1 导入实验所需要的包 import numpy as np import torch from torch import nn from torch.utils import data import matplotlib.pyplot as plt #解决内核挂掉 import os os.env 阅读全文
摘要:
参考:官方文档 源码 官方文档 nn.Sequential A sequential container. Modules will be added to it in the order they are passed in the constructor. Alternatively, an o 阅读全文