Skip to content

Commit

Permalink
Explicitly replace "import tensorflow" with "tensorflow.compat.v1"
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 288392606
  • Loading branch information
Deepmind Team authored and diegolascasas committed Jan 15, 2020
1 parent 8b47d2a commit b8cf445
Show file tree
Hide file tree
Showing 22 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion cs_gan/cs.py
Expand Up @@ -19,7 +19,7 @@
import math

import sonnet as snt
import tensorflow as tf
import tensorflow.compat.v1 as tf

from cs_gan import utils

Expand Down
2 changes: 1 addition & 1 deletion cs_gan/gan.py
Expand Up @@ -16,7 +16,7 @@
import math

import sonnet as snt
import tensorflow as tf
import tensorflow.compat.v1 as tf

from cs_gan import utils

Expand Down
2 changes: 1 addition & 1 deletion cs_gan/main.py
Expand Up @@ -21,7 +21,7 @@
from absl import app
from absl import flags
from absl import logging
import tensorflow as tf
import tensorflow.compat.v1 as tf

from cs_gan import file_utils
from cs_gan import gan
Expand Down
2 changes: 1 addition & 1 deletion cs_gan/main_cs.py
Expand Up @@ -22,7 +22,7 @@
from absl import flags
from absl import logging

import tensorflow as tf
import tensorflow.compat.v1 as tf
import tensorflow_probability as tfp

from cs_gan import cs
Expand Down
2 changes: 1 addition & 1 deletion cs_gan/nets.py
Expand Up @@ -17,7 +17,7 @@
import re
import numpy as np
import sonnet as snt
import tensorflow as tf
import tensorflow.compat.v1 as tf
import tensorflow_gan as tfgan


Expand Down
2 changes: 1 addition & 1 deletion cs_gan/tests/gan_test.py
Expand Up @@ -14,7 +14,7 @@


import sonnet as snt
import tensorflow as tf
import tensorflow.compat.v1 as tf

from cs_gan import gan

Expand Down
2 changes: 1 addition & 1 deletion cs_gan/utils.py
Expand Up @@ -19,7 +19,7 @@

from absl import logging
import numpy as np
import tensorflow as tf
import tensorflow.compat.v1 as tf
import tensorflow_probability as tfp

from cs_gan import nets
Expand Down
2 changes: 1 addition & 1 deletion curl/layers.py
Expand Up @@ -17,7 +17,7 @@

from absl import logging
import sonnet as snt
import tensorflow as tf
import tensorflow.compat.v1 as tf

tfc = tf.compat.v1

Expand Down
2 changes: 1 addition & 1 deletion curl/model.py
Expand Up @@ -18,7 +18,7 @@
from absl import logging
import numpy as np
import sonnet as snt
import tensorflow as tf
import tensorflow.compat.v1 as tf
import tensorflow_probability as tfp

from curl import layers
Expand Down
2 changes: 1 addition & 1 deletion curl/training.py
Expand Up @@ -22,7 +22,7 @@
import numpy as np
from sklearn import neighbors
import sonnet as snt
import tensorflow as tf
import tensorflow.compat.v1 as tf
import tensorflow_datasets as tfds
import tensorflow_probability as tfp

Expand Down
2 changes: 1 addition & 1 deletion curl/utils.py
Expand Up @@ -20,7 +20,7 @@
from __future__ import print_function

from absl import logging
import tensorflow as tf
import tensorflow.compat.v1 as tf
import tensorflow_probability as tfp


Expand Down
2 changes: 1 addition & 1 deletion hierarchical_probabilistic_unet/geco_utils.py
Expand Up @@ -23,7 +23,7 @@

import numpy as np
import sonnet as snt
import tensorflow as tf
import tensorflow.compat.v1 as tf


class MovingAverage(snt.AbstractModule):
Expand Down
2 changes: 1 addition & 1 deletion hierarchical_probabilistic_unet/model_test.py
Expand Up @@ -19,7 +19,7 @@
from __future__ import print_function

from model import HierarchicalProbUNet
import tensorflow as tf
import tensorflow.compat.v1 as tf


_NUM_CLASSES = 2
Expand Down
2 changes: 1 addition & 1 deletion hierarchical_probabilistic_unet/unet_utils.py
Expand Up @@ -19,7 +19,7 @@
from __future__ import print_function

import sonnet as snt
import tensorflow as tf
import tensorflow.compat.v1 as tf


def res_block(input_features, n_channels, n_down_channels=None,
Expand Down
2 changes: 1 addition & 1 deletion transporter/transporter.py
Expand Up @@ -21,7 +21,7 @@
import functools

import sonnet as snt
import tensorflow as tf
import tensorflow.compat.v1 as tf
from tensorflow.contrib import framework as contrib_framework
from tensorflow.contrib import layers as contrib_layers

Expand Down
2 changes: 1 addition & 1 deletion transporter/transporter_test.py
Expand Up @@ -19,7 +19,7 @@
from __future__ import print_function

from absl.testing import parameterized
import tensorflow as tf
import tensorflow.compat.v1 as tf
from transporter import transporter


Expand Down
2 changes: 1 addition & 1 deletion tvt/losses.py
Expand Up @@ -21,7 +21,7 @@
from __future__ import print_function

import six
import tensorflow as tf
import tensorflow.compat.v1 as tf


def sum_time_average_batch(tensor, name=None):
Expand Down
2 changes: 1 addition & 1 deletion tvt/main.py
Expand Up @@ -28,7 +28,7 @@
import numpy as np
from six.moves import range
from six.moves import zip
import tensorflow as tf
import tensorflow.compat.v1 as tf

from tvt import batch_env
from tvt import nest_utils
Expand Down
2 changes: 1 addition & 1 deletion tvt/memory.py
Expand Up @@ -23,7 +23,7 @@
import collections

import sonnet as snt
import tensorflow as tf
import tensorflow.compat.v1 as tf

ReadInformation = collections.namedtuple(
'ReadInformation', ('weights', 'indices', 'keys', 'strengths'))
Expand Down
2 changes: 1 addition & 1 deletion tvt/rma.py
Expand Up @@ -26,7 +26,7 @@
from six.moves import range
from six.moves import zip
import sonnet as snt
import tensorflow as tf
import tensorflow.compat.v1 as tf
import trfl

from tvt import losses
Expand Down
2 changes: 1 addition & 1 deletion unrestricted_advx/main.py
Expand Up @@ -16,7 +16,7 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
import tensorflow.compat.v1 as tf
import tensorflow_hub as hub
from unrestricted_advex import eval_kit

Expand Down
2 changes: 1 addition & 1 deletion unsupervised_adversarial_training/quick_eval_cifar.py
Expand Up @@ -29,7 +29,7 @@
import cleverhans
from cleverhans import attacks
import numpy as np
import tensorflow as tf
import tensorflow.compat.v1 as tf
from tensorflow.python.ops import math_grad
import tensorflow_hub as hub

Expand Down

0 comments on commit b8cf445

Please sign in to comment.