23 lines
523 B
Python
23 lines
523 B
Python
from test2 import *
|
|
|
|
import tensorflow as tf
|
|
|
|
td, vd = tf.keras.utils.image_dataset_from_directory(
|
|
"../dataset-ultimate-1",
|
|
shuffle = True,
|
|
seed = 12345,
|
|
subset = "both",
|
|
validation_split = 0.1,
|
|
image_size = (300, 300),
|
|
labels = "inferred",
|
|
label_mode = "binary",
|
|
batch_size = 32)
|
|
|
|
ckpt = kc.ModelCheckpoint("model2.keras", save_best_only = True)
|
|
|
|
m.fit(td,
|
|
epochs = 30,
|
|
verbose = 1,
|
|
validation_data = vd,
|
|
callbacks = [ckpt])
|