Skip to content

Commit

Permalink
fix: comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JGSweets committed Jun 5, 2024
1 parent 30c8207 commit 062355e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dataprofiler/labelers/char_load_tf_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def _construct_model(self) -> None:
num_labels, activation="softmax", name="softmax_output"
)(self._model.layers[softmax_layer_ind - 1].output)

# Output the model into a .pb file for TensorFlow
# Add argmax layer to get labels directly as an output
argmax_layer = tf.keras.ops.argmax(new_softmax_layer, axis=2)

argmax_outputs = [new_softmax_layer, argmax_layer]
Expand Down Expand Up @@ -308,7 +308,7 @@ def _reconstruct_model(self) -> None:
num_labels, activation="softmax", name="softmax_output"
)(self._model.layers[-2].output)

# Output the model into a .pb file for TensorFlow
# Add argmax layer to get labels directly as an output
argmax_layer = tf.keras.ops.argmax(final_softmax_layer, axis=2)

argmax_outputs = [final_softmax_layer, argmax_layer]
Expand Down
4 changes: 2 additions & 2 deletions dataprofiler/labelers/character_level_cnn_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ def _construct_model(self) -> None:
# Add the final Softmax layer
self._model.add(tf.keras.layers.Dense(num_labels, activation="softmax"))

# Output the model into a .pb file for TensorFlow
# Add argmax layer to get labels directly as an output
argmax_layer = tf.keras.ops.argmax(self._model.outputs[0], axis=2)

# Create confidence layers
Expand Down Expand Up @@ -620,7 +620,7 @@ def _reconstruct_model(self) -> None:
num_labels, activation="softmax", name="dense_2"
)(self._model.layers[-3].output)

# Output the model into a .pb file for TensorFlow
# Add argmax layer to get labels directly as an output
argmax_layer = tf.keras.ops.argmax(final_softmax_layer, axis=2)

# Create confidence layers
Expand Down

0 comments on commit 062355e

Please sign in to comment.