mirror of
https://github.com/davrot/pytutorial.git
synced 2025-06-07 16:00:02 +02:00
Add files via upload
Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com>
This commit is contained in:
parent
d36eb14226
commit
4906893756
4 changed files with 332 additions and 0 deletions
21
tensorflow/intro/keras_test.py
Normal file
21
tensorflow/intro/keras_test.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
from tensorflow import keras
|
||||
from DataGenerator import DataGenerator
|
||||
|
||||
number_of_classes: int = 10
|
||||
size_of_batch_test: int = 100
|
||||
model_id: int = 49
|
||||
|
||||
test_data = DataGenerator(
|
||||
train=False,
|
||||
size_of_batch=size_of_batch_test,
|
||||
number_of_classes=number_of_classes,
|
||||
do_shuffle=False,
|
||||
)
|
||||
|
||||
keras.backend.clear_session()
|
||||
|
||||
network = keras.models.load_model("./Model_" + str(model_id) + ".h5")
|
||||
|
||||
test_loss, test_acc = network.evaluate(x=test_data)
|
||||
|
||||
print(f"Correct: {test_acc * 100.0:.2f}%")
|
Loading…
Add table
Add a link
Reference in a new issue