Skip to content

Commit

Permalink
Explicitly replace "import tensorflow" with "tensorflow.compat.v1" fo…
Browse files Browse the repository at this point in the history
…r TF2.x migration

PiperOrigin-RevId: 295207815
  • Loading branch information
sun51 authored and copybara-github committed Feb 14, 2020
1 parent 1d69caf commit 6df7081
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion axial/config_imagenet32.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from __future__ import division
from __future__ import print_function

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


def get_config():
Expand Down
2 changes: 1 addition & 1 deletion axial/config_imagenet64.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from __future__ import division
from __future__ import print_function

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


def get_config():
Expand Down
2 changes: 1 addition & 1 deletion axial/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from __future__ import print_function

import numpy as np
import tensorflow as tf
import tensorflow.compat.v1 as tf
from tensorflow.python.tpu import tpu_function


Expand Down
2 changes: 1 addition & 1 deletion depth_from_video_in_the_wild/consistency_losses.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from __future__ import division
from __future__ import print_function

import tensorflow as tf # tf
import tensorflow.compat.v1 as tf # tf
from depth_from_video_in_the_wild import transform_utils
from tensorflow.contrib import resampler as contrib_resampler

Expand Down
2 changes: 1 addition & 1 deletion depth_from_video_in_the_wild/depth_prediction_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"""

import numpy as np
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 depth_from_video_in_the_wild/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

from absl import logging

import tensorflow as tf
import tensorflow.compat.v1 as tf
from depth_from_video_in_the_wild import consistency_losses
from depth_from_video_in_the_wild import depth_prediction_net
from depth_from_video_in_the_wild import motion_prediction_net
Expand Down
2 changes: 1 addition & 1 deletion protoattend/main_protoattend.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import model
import numpy as np
from options import FLAGS
import tensorflow as tf
import tensorflow.compat.v1 as tf
import utils

# GPU options
Expand Down
2 changes: 1 addition & 1 deletion protoattend/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import input_data
import numpy as np
from options import FLAGS
import tensorflow as tf
import tensorflow.compat.v1 as tf


# Building blocks of the network
Expand Down
2 changes: 1 addition & 1 deletion protoattend/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

"""Input flags."""

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

flags = tf.app.flags
FLAGS = flags.FLAGS
Expand Down
2 changes: 1 addition & 1 deletion tabnet/data_helper_covertype.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

"""Data helper function for the Forest Covertype dataset."""

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

# Dataset size
# N_TRAIN_SAMPLES = 309871
Expand Down
2 changes: 1 addition & 1 deletion tabnet/data_helper_poker.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

"""Data helper function for the Poker dataset."""

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

# Dataset size
# N_TRAIN_SAMPLES = 25010
Expand Down
2 changes: 1 addition & 1 deletion tabnet/tabnet_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from __future__ import print_function

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


def glu(act, n_units):
Expand Down

0 comments on commit 6df7081

Please sign in to comment.