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 tensorflow as tf | |
from sklearn import datasets | |
from sklearn.model_selection import train_test_split | |
from sklearn.utils import shuffle | |
import matplotlib.pyplot as plt | |
# シードを設定 | |
np.random.seed(0) |
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 tensorflow as tf | |
(x_train, y_train), (x_test, y_test) = tf.keras.datasets.boston_housing.load_data() | |
x_train_mean = x_train.mean(axis=0) | |
x_train_std = x_train.std(axis=0) | |
y_train_mean = y_train.mean() | |
y_train_std = y_train.std() | |
x_train = (x_train-x_train_mean)/x_train_std |
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 tensorflow as tf | |
import keras | |
from tensorflow.python.keras.datasets import cifar10 | |
from tensorflow.python.keras.utils import to_categorical | |
from tensorflow.python.keras.models import Sequential | |
from tensorflow.python.keras.layers import Conv2D, MaxPooling2D, Dropout, Flatten, Dense | |
from tensorflow.python.keras.callbacks import TensorBoard | |
(x_train, y_train), (x_test, y_test) = cifar10.load_data() |
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') |
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 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
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 datetime | |
import pickle | |
import numpy as np | |
import matplotlib.pyplot as plt |
OlderNewer