08 2022 档案
摘要:import torch import torch.nn as nn import torch.autograd as autograd from torch import optim def prepare_sequence(seq,to_ix): idxs = [to_ix[w] for w i
阅读全文
摘要:import torch import torch.nn as nn import torchvision.datasets as dsets import torchvision.transforms as transforms from torch.autograd import Variabl
阅读全文
摘要:import torch m = torch.nn.BatchNorm1d(10) m = torch.nn.BatchNorm1d(10,affine=False) input = torch.autograd.Variable(torch.randn(20,10)) output = m(inp
阅读全文
摘要:import torch import torch.utils.data as Data import torch.nn.functional as F from torch.autograd import Variable import matplotlib.pyplot as plt impor
阅读全文
摘要:根据课程手写代码,归纳总结笔记 #导入包 import torch import matplotlib.pyplot as plt import torch.nn.functional as F from sklearn.datasets import load_iris from torch.au
阅读全文
摘要:#!/usr/bin/env python # coding: utf-8 #数据爬取 import requests from fake_useragent import UserAgent import pandas as pd #import xlrd import numpy as np f
阅读全文