touch ups
This commit is contained in:
parent
d09cc37c54
commit
1aeb9bf1fa
@ -32,15 +32,29 @@ classifier.compile(optimizer = "adam", loss = "binary_crossentropy", metrics = [
|
|||||||
```
|
```
|
||||||
|
|
||||||
After that I did some work with preprocessing the images I was working with. Made sure that the size is still (110, 110). set a batch size, allowed for flips and such.
|
After that I did some work with preprocessing the images I was working with. Made sure that the size is still (110, 110). set a batch size, allowed for flips and such.
|
||||||
|
```
|
||||||
|
train_datagen = ImageDataGenerator(
|
||||||
|
rescale=1./255,
|
||||||
|
shear_range=0.1,
|
||||||
|
zoom_range=0.1,
|
||||||
|
width_shift_range=0.1,
|
||||||
|
height_shift_range=0.1,
|
||||||
|
horizontal_flip=True,
|
||||||
|
vertical_flip=True,
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
Later I trained my classifier and saved it's weights for future use in the project. I attempted this about 5 times with different number of epochs and the size per epoch.
|
Later I trained my classifier and saved it's weights for future use in the project. I attempted this about 5 times with different number of epochs and the size per epoch.
|
||||||
|
|
||||||
|
**UPDATE:**
|
||||||
|
I tried running it once again with more epochs and steps per epoch and get a better resulat and I think a better validation loss than before.
|
||||||
```
|
```
|
||||||
classifier.fit_generator( train_generator, steps_per_epoch = 150, epochs = 25, validation_data = test_generator )
|
classifier.fit_generator( train_generator, steps_per_epoch = 165, epochs = 32, validation_data = test_generator )
|
||||||
classifier.save_weights('model_ver_4.h5')
|
classifier.save_weights('model_ver_5.h5')
|
||||||
```
|
```
|
||||||
|
|
||||||
Training:
|
Training:
|
||||||
![Example](https://i.imgur.com/FNoNLJq.png)
|
![Example](https://i.imgur.com/HBBvWCM.png)
|
||||||
|
|
||||||
|
|
||||||
## Changes in the common part
|
## Changes in the common part
|
||||||
|
Loading…
Reference in New Issue
Block a user