Created
July 24, 2020 08:20
-
-
Save akash-ch2812/d5406ba9c7fac3812aaa0abd85126d22 to your computer and use it in GitHub Desktop.
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
# get training data | |
train_data = create_trianing_data(train_image_captions, train_image_features, tokenizer, max_caption_len, vocab_length, 32) | |
# initialize model | |
model = create_model(max_caption_len, vocab_len) | |
steps_per_epochs = len(train_image_captions)//32 | |
# compile model | |
model.compile(optimizer='adam', loss='categorical_crossentropy') | |
model.fit_generator(train_data, epochs=100, steps_per_epoch=steps_per_epochs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment