Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion smdebug/tensorflow/keras.py
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,7 @@ def save_tape_logs(self, model_inputs=None, outputs=None):
:param outputs:
:return:
"""
logs = {ModelOutput.Y: outputs, ModelInput.X: model_inputs}
logs = {ModelOutput.PREDICTIONS: outputs, ModelInput.INPUTS: model_inputs}
self.save_smdebug_logs(logs)

def wrap_tape(self, tape):
Expand Down
27 changes: 16 additions & 11 deletions smdebug/tensorflow/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,35 @@


class ModelOutput:
Y = "smdebug_y"
Y_PRED = "smdebug_y_pred"
VAL_Y = "val_smdebug_y"
VAL_Y_PRED = "val_smdebug_y_pred"
LABELS = "smdebug_y"
PREDICTIONS = "smdebug_y_pred"
VAL_LABELS = "val_smdebug_y"
VAL_PREDICTIONS = "val_smdebug_y_pred"


ModelOutputs = {ModelOutput.Y, ModelOutput.Y_PRED, ModelOutput.VAL_Y, ModelOutput.VAL_Y_PRED}
ModelOutputs = {
ModelOutput.LABELS,
ModelOutput.PREDICTIONS,
ModelOutput.VAL_LABELS,
ModelOutput.VAL_PREDICTIONS,
}


def get_model_output_export_name(key):
export_names = {
ModelOutput.Y_PRED: "predictions",
ModelOutput.Y: "labels",
ModelOutput.VAL_Y: "labels",
ModelOutput.VAL_Y_PRED: "predictions",
ModelOutput.PREDICTIONS: "predictions",
ModelOutput.LABELS: "labels",
ModelOutput.VAL_LABELS: "labels",
ModelOutput.VAL_PREDICTIONS: "predictions",
}
return export_names[key]


class ModelInput:
X = "smdebug_x"
INPUTS = "smdebug_x"


ModelInputs = {ModelInput.X}
ModelInputs = {ModelInput.INPUTS}


def get_model_input_export_name():
Expand Down