mirror of
https://github.com/zebrajr/tensorflow.git
synced 2025-12-06 12:20:11 +01:00
Made summary writer optional
This commit is contained in:
parent
2c30a0b17c
commit
370beed492
|
|
@ -107,7 +107,7 @@ class TensorFlowEstimator(BaseEstimator):
|
|||
datetime.datetime.now().strftime('%Y-%m-%d_%H-%M-%S')),
|
||||
graph_def=self._session.graph_def)
|
||||
|
||||
def fit(self, X, y, logdir='/tmp/tensorflow_logs'):
|
||||
def fit(self, X, y, logdir=None):
|
||||
"""Builds a neural network model given provided `model_fn` and training
|
||||
data X and y.
|
||||
|
||||
|
|
@ -119,7 +119,7 @@ class TensorFlowEstimator(BaseEstimator):
|
|||
iterator that returns array of targets. The training target values
|
||||
(class labels in classification, real numbers in regression).
|
||||
logdir: the directory to save the log file that can be used for
|
||||
optional visualization (default: '/tmp/tensorflow_logs').
|
||||
optional visualization.
|
||||
|
||||
Returns:
|
||||
Returns self.
|
||||
|
|
@ -133,7 +133,8 @@ class TensorFlowEstimator(BaseEstimator):
|
|||
self._trainer.initialize(self._session)
|
||||
self._initialized = True
|
||||
# Sets up summary writer for later optional visualization
|
||||
self._setup_summary_writer(logdir)
|
||||
if logdir:
|
||||
self._setup_summary_writer(logdir)
|
||||
|
||||
# Train model for given number of steps.
|
||||
self._trainer.train(self._session,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user