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 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
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 os | |
import glob | |
import math | |
import random | |
import datetime | |
import pickle | |
import numpy as np | |
import matplotlib.pyplot as plt |
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 os | |
import glob | |
import math | |
import random | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from tensorflow.python import keras | |
from tensorflow.python.keras import backend as K |
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 os | |
import glob | |
import math | |
import random | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from tensorflow.python import keras | |
from tensorflow.python.keras import backend as K |
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 os | |
import glob | |
import math | |
import random | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import cv2 | |
from tensorflow.python import keras |
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 os | |
import glob | |
import math | |
import random | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from tensorflow.python import keras | |
from tensorflow.python.keras import backend as K |
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 tensorflow.python.keras.applications.vgg16 import VGG16 | |
from tensorflow.python.keras.models import Sequential | |
from tensorflow.python.keras.layers import Dropout, Flatten, Dense | |
from tensorflow.python.keras.optimizers import SGD | |
from tensorflow.python.keras.preprocessing.image import ImageDataGenerator | |
from tensorflow.python.keras.applications.vgg16 import preprocess_input | |
from tensorflow.python.keras.callbacks import ModelCheckpoint, CSVLogger | |
import os | |
from datetime import datetime | |
import json |
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 glob | |
import os | |
import random | |
import math | |
import numpy as np | |
import pandas as pd | |
import matplotlib | |
# matplotlib.use('Agg') |