Skip to content
Snippets Groups Projects

Estimators optimize loss

Merged Amir MOHAMMADI requested to merge estimators_optimize_loss into master
4 files
+ 13
11
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -44,7 +44,7 @@ def dataset_to_tfrecord(dataset, output):
@@ -44,7 +44,7 @@ def dataset_to_tfrecord(dataset, output):
Parameters
Parameters
----------
----------
dataset : tf.data.Dataset
dataset : ``tf.data.Dataset``
The tf.data.Dataset that you want to write into a TFRecord file.
The tf.data.Dataset that you want to write into a TFRecord file.
output : str
output : str
Path to the TFRecord file. Besides this file, a .json file is also created.
Path to the TFRecord file. Besides this file, a .json file is also created.
@@ -53,7 +53,7 @@ def dataset_to_tfrecord(dataset, output):
@@ -53,7 +53,7 @@ def dataset_to_tfrecord(dataset, output):
Returns
Returns
-------
-------
tf.Operation
``tf.Operation``
A tf.Operation that, when run, writes contents of dataset to a file. When
A tf.Operation that, when run, writes contents of dataset to a file. When
running in eager mode, calling this function will write the file. Otherwise, you
running in eager mode, calling this function will write the file. Otherwise, you
have to call session.run() on the returned operation.
have to call session.run() on the returned operation.
@@ -100,7 +100,7 @@ def dataset_from_tfrecord(tfrecord):
@@ -100,7 +100,7 @@ def dataset_from_tfrecord(tfrecord):
Returns
Returns
-------
-------
tf.data.Dataset
``tf.data.Dataset``
A dataset that contains the data from the TFRecord file.
A dataset that contains the data from the TFRecord file.
"""
"""
# these imports are needed so that eval can work
# these imports are needed so that eval can work
@@ -468,7 +468,8 @@ def batch_data_and_labels(
@@ -468,7 +468,8 @@ def batch_data_and_labels(
"""
"""
Dump in order batches from a list of tf-record files
Dump in order batches from a list of tf-record files
**Parameters**
Parameters
 
----------
tfrecord_filenames:
tfrecord_filenames:
List containing the tf-record paths
List containing the tf-record paths
Loading