changing a mistake
This commit is contained in:
parent
c7ecb5835f
commit
f85acaa73e
@ -42,7 +42,7 @@ classifier.add(MaxPooling2D(pool_size=(2, 2)))
|
||||
classifier.add(Flatten())
|
||||
classifier.add(Dense(activation = "relu", units = 64 ))
|
||||
classifier.add(Dense(activation = "softmax", units = 5))
|
||||
classifier.compile(optimizer = "adam", loss = "binary_crossentropy", metrics = ["accuracy"])
|
||||
classifier.compile(optimizer = "adam", loss = "categorical_crossentropy", metrics = ["accuracy"])
|
||||
|
||||
|
||||
|
||||
@ -80,14 +80,14 @@ test_generator = test_datagen.flow_from_directory(
|
||||
|
||||
#Teaching the classifier
|
||||
'''classifier.fit_generator( train_generator, steps_per_epoch = 165, epochs = 32, validation_data = test_generator )
|
||||
classifier.save_weights('model_ver_5.h5')'''
|
||||
classifier.save_weights('model_ver_6.h5')'''
|
||||
|
||||
|
||||
labels = (train_generator.class_indices)
|
||||
labels = dict((value,key) for key,value in labels.items())
|
||||
|
||||
|
||||
classifier.load_weights("model_ver_5.h5")
|
||||
classifier.load_weights("model_ver_6.h5")
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user