Skip to content

Commit

Permalink
Fix converge issue in Orca TF Estimator (#3107)
Browse files Browse the repository at this point in the history
* fix tfdataset standardlize

* update

* fix test

* fix style
  • Loading branch information
jenniew authored and yangw1234 committed Sep 27, 2021
1 parent 7c42ec0 commit 3132daa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/orca/src/bigdl/orca/learn/tf/estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

from bigdl.optim.optimizer import MaxEpoch

from zoo.tfpark.tf_dataset import TFNdarrayDataset
from zoo.tfpark.model import _standarize_feature_label_dataset

from zoo.common.utils import load_from_file
from zoo.orca.data.tf.data import Dataset, TFDataDataset2
from zoo.orca.learn.tf.utils import *
Expand Down Expand Up @@ -628,6 +631,8 @@ def fit(self, data,
hard_code_batch_size=hard_code_batch_size,
sequential_order=False, shuffle=True,
auto_shard_files=auto_shard_files)
if isinstance(dataset, TFNdarrayDataset):
dataset = _standarize_feature_label_dataset(dataset, self.model.model)

self.tf_optimizer = TFOptimizer.from_keras(self.model.model, dataset,
model_dir=self.model.model_dir,
Expand Down

0 comments on commit 3132daa

Please sign in to comment.