Unverified Commit cb1567e8 authored by Frank Chen's avatar Frank Chen Committed by GitHub
Browse files

Add new import paths to mnist_tpu.py (#4133)

* Add new import paths to mnist_tpu.py

This adds new import paths to mnist_tpu.py so individuals can check out the git repository and run `python mnist_tpu.py` without finagling with python import search paths.

* Fix lint errors

* Add disable= to pylint instructions

* Remove parent path

* Update comments
parent 22a00338
...@@ -23,10 +23,16 @@ from __future__ import absolute_import ...@@ -23,10 +23,16 @@ from __future__ import absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
import os
import sys
import tensorflow as tf # pylint: disable=g-bad-import-order import tensorflow as tf # pylint: disable=g-bad-import-order
from official.mnist import dataset # For open source environment, add grandparent directory for import
from official.mnist import mnist sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(sys.path[0]))))
from official.mnist import dataset # pylint: disable=wrong-import-position
from official.mnist import mnist # pylint: disable=wrong-import-position
# Cloud TPU Cluster Resolver flags # Cloud TPU Cluster Resolver flags
tf.flags.DEFINE_string( tf.flags.DEFINE_string(
......
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