Loading LSTM.ipynb 0 → 100644 +34 −0 Original line number Diff line number Diff line %% Cell type:code id: tags: ``` python # required dependecies ``` %% Cell type:code id: tags: ``` python # imports ``` %% Cell type:code id: tags: ``` python # Configuration of LSTM ``` %% Cell type:code id: tags: ``` python # Load Data and show attention sample ``` %% Cell type:code id: tags: ``` python # Use validation data calculate Reference values ``` %% Cell type:code id: tags: ``` python ``` caption-lib/lstm/Validators/coco_validator.py +4 −4 Original line number Diff line number Diff line Loading @@ -86,9 +86,9 @@ class coco_validator(object): else: image_path = _config.path.image_data_path + _config.path.image_validation """ if attention_visualization: for n in range(10): if _config.validator.show_attention: for n in range(_config.validator.attention_sample_number): print("#>\tSampled Caption: %s" % decoded[n]) # Plot original image Loading Loading @@ -123,7 +123,7 @@ class coco_validator(object): plt.axis('off') plt.show() """ if save_sampled_captions: num_iter = int(np.ceil(features.shape[0] / self.batch_size)) - self.batch_size Loading caption-lib/lstm/configuration.py +7 −5 Original line number Diff line number Diff line Loading @@ -38,22 +38,24 @@ class default_reader(object): # default reader config # current_reader = "basic_text_reader.py" class default_validator(object): validator_on = True validator_on = False verbose = False attention_sample_number = 1 show_attention = False class default_trainer(object): train_on = True train_on = False train_fresh_and_override = True verbose = False num_layers = 2 num_layers = 1 num_epochs = 60 num_steps = 35 vector_size = 2048 batch_size = 20 dropout_on = True dropout = 0.5 init_scale = 0.05 forget_bias = 1.0 # init_scale = 0.05 forget_bias = 0.4 hidden_size = 1024 learning_rate = 0.001 Loading Loading
LSTM.ipynb 0 → 100644 +34 −0 Original line number Diff line number Diff line %% Cell type:code id: tags: ``` python # required dependecies ``` %% Cell type:code id: tags: ``` python # imports ``` %% Cell type:code id: tags: ``` python # Configuration of LSTM ``` %% Cell type:code id: tags: ``` python # Load Data and show attention sample ``` %% Cell type:code id: tags: ``` python # Use validation data calculate Reference values ``` %% Cell type:code id: tags: ``` python ```
caption-lib/lstm/Validators/coco_validator.py +4 −4 Original line number Diff line number Diff line Loading @@ -86,9 +86,9 @@ class coco_validator(object): else: image_path = _config.path.image_data_path + _config.path.image_validation """ if attention_visualization: for n in range(10): if _config.validator.show_attention: for n in range(_config.validator.attention_sample_number): print("#>\tSampled Caption: %s" % decoded[n]) # Plot original image Loading Loading @@ -123,7 +123,7 @@ class coco_validator(object): plt.axis('off') plt.show() """ if save_sampled_captions: num_iter = int(np.ceil(features.shape[0] / self.batch_size)) - self.batch_size Loading
caption-lib/lstm/configuration.py +7 −5 Original line number Diff line number Diff line Loading @@ -38,22 +38,24 @@ class default_reader(object): # default reader config # current_reader = "basic_text_reader.py" class default_validator(object): validator_on = True validator_on = False verbose = False attention_sample_number = 1 show_attention = False class default_trainer(object): train_on = True train_on = False train_fresh_and_override = True verbose = False num_layers = 2 num_layers = 1 num_epochs = 60 num_steps = 35 vector_size = 2048 batch_size = 20 dropout_on = True dropout = 0.5 init_scale = 0.05 forget_bias = 1.0 # init_scale = 0.05 forget_bias = 0.4 hidden_size = 1024 learning_rate = 0.001 Loading