Anandx05 commited on
Commit
1d9b6f8
1 Parent(s): 876082b

Update model.py

Browse files
Files changed (1) hide show
  1. model.py +3 -3
model.py CHANGED
@@ -14,7 +14,7 @@ UNITS = 512
14
 
15
 
16
  # LOADING DATA
17
- vocab = pickle.load(open('saved_vocabulary/vocab_coco_1', 'rb'))
18
 
19
  tokenizer = tf.keras.layers.TextVectorization(
20
  # max_tokens=VOCABULARY_SIZE,
@@ -321,8 +321,8 @@ def get_caption_model():
321
  caption_model.decoder(sample_y, sample_enc_out, training=False)
322
 
323
  try:
324
- caption_model.load_weights('saved_models/image_captioning_coco_weights.h5')
325
  except FileNotFoundError:
326
- caption_model.load_weights('Image-Captioning/saved_models/image_captioning_coco_weights.h5')
327
 
328
  return caption_model
 
14
 
15
 
16
  # LOADING DATA
17
+ vocab = pickle.load(open('vocabulary/vocab_coco_1', 'rb'))
18
 
19
  tokenizer = tf.keras.layers.TextVectorization(
20
  # max_tokens=VOCABULARY_SIZE,
 
321
  caption_model.decoder(sample_y, sample_enc_out, training=False)
322
 
323
  try:
324
+ caption_model.load_weights('model weights/image_captioning_coco_weights.h5')
325
  except FileNotFoundError:
326
+ caption_model.load_weights('image-captioning-mscoco/model weights/image_captioning_coco_weights.h5')
327
 
328
  return caption_model