Unverified Commit 6e3e5c38 authored by yhliang2018's avatar yhliang2018 Committed by GitHub
Browse files

make /official a Python module (#3557)

* Adding logging utils

* restore utils

* delete old file

* update inputs and docstrings

* make /official a python module

* remove /utils directory

* Update readme for python path setting

* Change readme texts
parent d9c430b3
......@@ -8,7 +8,6 @@ The master branch of the models are **in development**, and they target the [nig
If you are on a version of TensorFlow earlier than 1.4, please [update your installation](https://www.tensorflow.org/install/).
---
Below is a list of the models available.
......@@ -22,3 +21,11 @@ Below is a list of the models available.
More models to come!
If you would like to make any fixes or improvements to the models, please [submit a pull request](https://github.com/tensorflow/models/compare).
---
Run the models.
The *Official Models* are made available as a Python module. To run the models and associated scripts, add the top-level ***/models*** folder to the Python path with the command: `export PYTHONPATH="$PYTHONPATH:/path/to/models"`
To make Official Models easier to use, we are planning to create a pip installable Official Models package. This is being tracked in [#917](https://github.com/tensorflow/models/issues/917).
......@@ -22,7 +22,7 @@ import os
import sys
import tensorflow as tf
import dataset
from official.mnist import dataset
class Model(tf.keras.Model):
......
......@@ -33,8 +33,8 @@ import time
import tensorflow as tf
import tensorflow.contrib.eager as tfe
import mnist
import dataset
from official.mnist import mnist
from official.mnist import dataset
FLAGS = None
......
......@@ -20,8 +20,8 @@ from __future__ import print_function
import tensorflow as tf
import tensorflow.contrib.eager as tfe
import mnist
import mnist_eager
from official.mnist import mnist
from official.mnist import mnist_eager
def device():
......
......@@ -20,7 +20,7 @@ from __future__ import print_function
import tensorflow as tf
import time
import mnist
from official.mnist import mnist
BATCH_SIZE = 100
......
......@@ -24,8 +24,8 @@ from __future__ import division
from __future__ import print_function
import tensorflow as tf
import dataset
import mnist
from official.mnist import dataset
from official.mnist import mnist
# Cloud TPU Cluster Resolver flags
tf.flags.DEFINE_string(
......
......@@ -23,7 +23,7 @@ import sys
import tensorflow as tf
import resnet
from official.resnet import resnet
_HEIGHT = 32
_WIDTH = 32
......
......@@ -22,7 +22,7 @@ from tempfile import mkstemp
import numpy as np
import tensorflow as tf
import cifar10_main
from official.resnet import cifar10_main
tf.logging.set_verbosity(tf.logging.ERROR)
......
......@@ -23,8 +23,8 @@ import sys
import tensorflow as tf
import resnet
import vgg_preprocessing
from official.resnet import resnet
from official.resnet import vgg_preprocessing
_DEFAULT_IMAGE_SIZE = 224
_NUM_CHANNELS = 3
......
......@@ -21,7 +21,7 @@ import unittest
import tensorflow as tf
import imagenet_main
from official.resnet import imagenet_main
tf.logging.set_verbosity(tf.logging.ERROR)
......
......@@ -21,7 +21,7 @@ import os
import tensorflow as tf
import wide_deep
from official.wide_deep import wide_deep
tf.logging.set_verbosity(tf.logging.ERROR)
......
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