This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
layout: default | |
t: | |
first: | |
en: "This is my first sentence" | |
fr: "C'est ma premiàre phrase" | |
second: | |
en: "My second sentence" | |
fr: "Ma deuxième phrase" | |
third: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
├── _site | |
| └── ... | |
├── _layouts | |
| ├── about | |
| | └──about_lyt.html | |
| └── hello_lyt.html | |
├── fr | |
| ├── à propos | |
| | └── apropos.html | |
| └── bonjour.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
├── fr | |
| ├── à propos | |
| | └── apropos.html | |
| └── bonjour.html | |
├── about | |
| └──about.html | |
└── hello.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
├── _config.yml | |
├── _layouts | |
| ├── default.html | |
| └── post.html | |
├── _site | |
| └── ... | |
└── index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from inception_resnet_v1 import * | |
def model_with_inception_resnet_base(pretrained_weights): | |
model = InceptionResNetV1() | |
if pretrained_weights == True: | |
#pre-trained weights https://drive.google.com/file/d/1971Xk5RwedbudGgTIrGAL4F7Aifu7id1/view?usp=sharing | |
model.load_weights('facenet_weights.h5') | |
new_model = models.Sequential() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Layer (type) Output Shape Param # | |
================================================================= | |
inception_resnet_v1 (Model) (None, 128) 22808144 | |
_________________________________________________________________ | |
dense_1 (Dense) (None, 256) 33024 | |
_________________________________________________________________ | |
dropout_1 (Dropout) (None, 256) 0 | |
_________________________________________________________________ | |
dense_2 (Dense) (None, 64) 16448 | |
_________________________________________________________________ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
layer_outputs = [layer.output for layer in model.layers[:depth]] | |
activation_model = models.Model(inputs=model.input, outputs=layer_outputs) | |
predictions = models.predict(input_img_tensor) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn.metrics import classification_report, confusion_matrix | |
TEST_SIZE=200 | |
target_names = ['J', 'L'] | |
Y_pred = model_convenet_ad_hoc.predict_generator(test_generator, TEST_SIZE) | |
Y_pred = Y_pred.flatten() | |
y_pred_class = np.where(Y_pred > 0.5, 1, 0) | |
print('Classification Report') | |
print(classification_report(test_generator.classes, y_pred_class, target_names=target_names)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model.compile(loss='binary_crossentropy', optimizer=optimizers.RMSprop(lr=1e-3), metrics=['acc']) | |
history = model.fit_generator(train_generator, steps_per_epoch=steps_per_epoch, epochs=30, validation_data=validation_generator, validation_steps=50) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Define TRAINING SET | |
train_datagen = ImageDataGenerator(rescale=1./255, rotation_range=0, | |
width_shift_range=0.2, | |
height_shift_range=0.2, | |
shear_range=0.2, | |
zoom_range=0.2, | |
horizontal_flip=True, fill_mode='nearest') | |
train_generator = train_datagen.flow_from_directory(TRAIN_DIR, | |
target_size=(TARGET_SIZE, TARGET_SIZE), |