Skip to content
Snippets Groups Projects
Commit b7559503 authored by Jorge Peña Queralta's avatar Jorge Peña Queralta
Browse files

cnn test

parent a1736082
No related branches found
No related tags found
No related merge requests found
......@@ -3,9 +3,11 @@
import time
import tensorflow as tf
from tensorflow.keras import datasets, layers, models
from tensorflow.python.keras import datasets, layers, models, utils
import matplotlib.pyplot as plt
print("Hello.")
(train_images, train_labels), (test_images, test_labels) = datasets.cifar10.load_data()
# Normalize pixel values to be between 0 and 1
......@@ -39,6 +41,7 @@ model.add(layers.Flatten())
model.add(layers.Dense(64, activation='relu'))
model.add(layers.Dense(10, activation='softmax'))
# utils.multi_gpu_model(model, gpus=1, cpu_merge=True, cpu_relocation=False)
count_start = time.time()
model.compile(optimizer='adam',
loss='sparse_categorical_crossentropy',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment