This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from torch import optim | |
from torch.utils.data import TensorDataset, DataLoader | |
from sklearn.model_selection import train_test_split | |
from sklearn.datasets import load_digits | |
X = digits.data | |
Y = digits.target | |
X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size=0.3) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
from torch import nn, optim | |
from torch.utils.data import TensorDataset, Dataset, DataLoader | |
import tqdm | |
from torchvision.datasets import FashionMNIST | |
from torchvision import transforms | |
fashion_mnist_train = FashionMNIST("data/FashionMNIST", train=True, download=True, transform=transforms.ToTensor()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
from torch import nn, optim | |
from torch.utils.data import TensorDataset, Dataset, DataLoader | |
import tqdm | |
from torchvision.datasets import ImageFolder | |
from torchvision import transforms | |
!wget https://github.com/lucidfrontier45/PyTorch-Book/raw/master/data/taco_and_burrito.tar.gz | |
!tar -zxvf './taco_and_burrito.tar.gz' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
import pandas as pd | |
from keras.models import Sequential | |
from keras.layers import * | |
from keras.layers.recurrent import SimpleRNN | |
from keras.optimizers import * | |
from keras.callbacks import * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import lightgbm as lgb | |
from sklearn.model_selection import * | |
!wget "https://www.analyticsvidhya.com/wp-content/uploads/2016/02/AirPassengers.csv" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!pip install -U torchvision | |
# http://vis-www.cs.umass.edu/lfw/ | |
!wget http://vis-www.cs.umass.edu/lfw/lfw-deepfunneled.tgz | |
!tar -xzvf lfw-deepfunneled.tgz | |
!mkdir ./lfw-deepfunneled/train | |
!mv ./lfw-deepfunneled/[A-W]* ./lfw-deepfunneled/train | |
!mkdir ./lfw-deepfunneled/test | |
!mv ./lfw-deepfunneled/[X-Z]* ./lfw-deepfunneled/test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!pip install -U torchvision | |
!wget http://www.robots.ox.ac.uk/~vgg/data/flowers/102/102flowers.tgz | |
!mkdir oxford-102 | |
!tar -xzvf 102flowers.tgz -C ./oxford-102 | |
import math | |
import numpy as np |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import pandas as pd | |
import torch | |
from sklearn.model_selection import * | |
from sklearn.model_selection import train_test_split | |
from sklearn.utils import shuffle | |
from torch import nn, optim |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pystan | |
import matplotlib.pyplot as plt | |
import pickle | |
# Stanモデル | |
model = """ | |
data { | |
int<lower=0> N; // 学習データの数 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function, division | |
import numpy as np | |
from scipy import stats | |
import matplotlib.pyplot as plt | |
import pystan | |
model = """ | |
data { | |
int<lower=1> N; |