21 lines
485 B
Python
21 lines
485 B
Python
from m import *
|
|
|
|
from matplotlib import pyplot as plt
|
|
|
|
ds = tf.keras.preprocessing.image_dataset_from_directory(
|
|
'../dataset-orig-aug-1-mini-1/',
|
|
labels = 'inferred',
|
|
label_mode = 'categorical',
|
|
color_mode = 'rgb',
|
|
image_size = (300, 300),
|
|
batch_size = 32,
|
|
verbose = True
|
|
)
|
|
|
|
p = mod.predict(ds)
|
|
r = np.concatenate([y for x, y in ds])
|
|
|
|
with open('results.txt', 'w') as f:
|
|
for i in zip(p, r):
|
|
f.write(f"{i[0][0]} {i[0][1]} {i[1][0]} {i[1][1]}\n")
|