Skip to content

Commit

Permalink
Add tensorboard support (intel-analytics#2667)
Browse files Browse the repository at this point in the history
* add tensorboard support

* fix style

* fix style2

* fix test
  • Loading branch information
jenniew authored Aug 11, 2020
1 parent b897a0b commit 7e1ede7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pyspark/bigdl/orca/tfpark/tf_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def __init__(self):

class TFValidationMethod(JavaValue):
def __init__(self, val_method, name, output_indices, label_indices):
self.name = name
self.val_method = val_method
JavaValue.__init__(self, None, "float",
val_method, name, output_indices, label_indices)

Expand Down Expand Up @@ -569,7 +571,7 @@ def from_loss(cls, loss, optim_method, session=None, inputs=None, dataset=None,
metrics = {}

for i, method in enumerate(val_methods):
metrics['bigdl_metirc_' + str(i)] = BigDLMetric(method, val_outputs, val_labels)
metrics['bigdl_metric_' + str(i)] = BigDLMetric(method, val_outputs, val_labels)

return TFOptimizer._from_grads(loss, sess, inputs, labels, grads, variables, dataset,
optim_method, clip_norm, clip_value,
Expand Down Expand Up @@ -688,7 +690,7 @@ def from_keras(cls, keras_model, dataset,
val_methods = to_list(bigdl_val_methods)
bigdl_metrics = {}
for i, method in enumerate(val_methods):
bigdl_metrics['bigdl_metirc_' + str(i)] = BigDLMetric(method,
bigdl_metrics['bigdl_metric_' + str(i)] = BigDLMetric(method,
val_outputs,
val_labels)
if metrics is None:
Expand Down

0 comments on commit 7e1ede7

Please sign in to comment.