목록pytorch 사용법 (6)
거의 알고리즘 일기장
In [1]: import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import DataLoader import torchvision.datasets as datasets from torch.autograd import Variable import visdom import torch.optim as optim In [3]: vis = visdom.Visdom() textwindow = vis.text("Hello Pytorch") Setting up a new session... In [9]: import torchvision import torchvision.transforms as transfor..
In [6]: import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import DataLoader import torchvision.datasets as datasets from torch.autograd import Variable import visdom import torch.optim as optim import torchvision.transforms as transforms In [7]: transform = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.5,0.5,0.5), (0.5,0.5,0.5))]) train..
In [14]: import os import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import torchvision from torch.utils.data import DataLoader, Dataset import PIL.Image as Image import matplotlib.pyplot as plt import torchvision.transforms as transforms import numpy as np In [15]: #custom trans = transforms.Compose([transforms.Resize((100, 100)), transforms...
In [3]: %matplotlib inline import matplotlib import matplotlib.pyplot as plt import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from torch.utils.data import Dataset, DataLoader import numpy as np import torchvision import torchvision.transforms as transforms In [4]: transform = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0...
In [3]: %matplotlib inline import matplotlib import matplotlib.pyplot as plt import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from torch.utils.data import Dataset, DataLoader import numpy as np import torchvision import torchvision.transforms as transforms In [4]: transform = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0...
In [10]: %matplotlib inline import matplotlib import matplotlib.pyplot as plt import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from torch.utils.data import Dataset, DataLoader import numpy as np import torchvision import torchvision.transforms as transforms In [2]: transform = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0..