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 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 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) |
NewerOlder