"git@developer.sourcefind.cn:modelzoo/resnet50_tensorflow.git" did not exist on "614d3d93d1dcdb8f1358ca12eeede382c4554c3e"
Commit 6c48895f authored by Marianne Linhares Monteiro's avatar Marianne Linhares Monteiro Committed by GitHub
Browse files

Adding instructions to generate TFRecord files

parent 3e117b65
...@@ -18,7 +18,8 @@ Code in this directory focuses on how to use TensorFlow Estimators to train and ...@@ -18,7 +18,8 @@ Code in this directory focuses on how to use TensorFlow Estimators to train and
$ curl -o cifar-10-python.tar.gz https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz $ curl -o cifar-10-python.tar.gz https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz
$ tar xzf cifar-10-python.tar.gz $ tar xzf cifar-10-python.tar.gz
``` ```
After running the above commands, you should see the following files in the folder where the data was downloaded.
After running the commands above, you should see the following files in the folder where the data was downloaded.
``` shell ``` shell
$ ls -R cifar-10-batches-py $ ls -R cifar-10-batches-py
...@@ -27,6 +28,23 @@ batches.meta data_batch_1 data_batch_2 data_batch_3 ...@@ -27,6 +28,23 @@ batches.meta data_batch_1 data_batch_2 data_batch_3
data_batch_4 data_batch_5 readme.html test_batch data_batch_4 data_batch_5 readme.html test_batch
``` ```
3. Generate TFRecord files.
```shell
# This will generate a tf record for the training and test data available at the input_dir.
# You can see more details in generate_cifar10_tf_records.py
$ python generate_cifar10_tfrecords.py --input_dir=/prefix/to/downloaded/data/cifar-10-batches-py \
--output_dir=/prefix/to/downloaded/data/cifar-10-batches-py
```
After running the command above, you should see the following new files in the output_dir.
``` shell
$ ls -R cifar-10-batches-py
data_batch_1.tfrecords data_batch_2.tfrecords data_batch_3.tfrecords
data_batch_4.tfrecords data_batch_5.tfrecords test_batch.tfrecords
```
## How to run on local mode ## How to run on local mode
``` ```
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment