Skip to content

Commit

Permalink
Update the OSS keras to test with _PREFER_OSS_KERAS = true.
Browse files Browse the repository at this point in the history
This will change TF to import the keras code from the workspace.

PiperOrigin-RevId: 362614634
  • Loading branch information
qlzh727 authored and tensorflower-gardener committed Mar 12, 2021
1 parent 2450150 commit 33f7c97
Show file tree
Hide file tree
Showing 33 changed files with 88 additions and 82 deletions.
1 change: 1 addition & 0 deletions keras/benchmarks/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ py_library(
":distribution_util",
"//:expect_numpy_installed",
"//:expect_tensorflow_installed",
"//keras/api:keras_api",
],
)

Expand Down
2 changes: 1 addition & 1 deletion keras/benchmarks/benchmark_util.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.compat.v2 as tf
import tensorflow as tf

import timeit
import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion keras/benchmarks/benchmark_util_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from __future__ import division
from __future__ import print_function

import tensorflow.compat.v2 as tf
import tensorflow as tf

from keras.benchmarks import benchmark_util

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

import tensorflow.compat.v2 as tf
import tensorflow as tf

import os

Expand Down
2 changes: 1 addition & 1 deletion keras/benchmarks/eager_microbenchmarks_test.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.compat.v2 as tf
import tensorflow as tf

import time
import six
Expand Down
2 changes: 1 addition & 1 deletion keras/benchmarks/keras_cpu_benchmark_test.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.compat.v2 as tf
import tensorflow as tf

import numpy as np
import six
Expand Down
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.compat.v2 as tf
import tensorflow as tf

from keras.benchmarks import benchmark_util

Expand Down
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.compat.v2 as tf
import tensorflow as tf

from keras.benchmarks import benchmark_util

Expand Down
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.compat.v2 as tf
import tensorflow as tf

from keras.benchmarks import benchmark_util

Expand Down
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.compat.v2 as tf
import tensorflow as tf

import numpy as np

Expand Down
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.compat.v2 as tf
import tensorflow as tf

import timeit
import numpy as np
Expand Down
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.compat.v2 as tf
import tensorflow as tf

from keras.benchmarks import benchmark_util

Expand Down
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.compat.v2 as tf
import tensorflow as tf

from keras.benchmarks import benchmark_util

Expand Down
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.compat.v2 as tf
import tensorflow as tf

import numpy as np

Expand Down
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.compat.v2 as tf
import tensorflow as tf

from keras.benchmarks import benchmark_util

Expand Down
2 changes: 1 addition & 1 deletion keras/benchmarks/layer_benchmarks/layer_benchmarks_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from __future__ import division
from __future__ import print_function

import tensorflow.compat.v2 as tf
import tensorflow as tf

import functools
import numpy as np
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from __future__ import division
from __future__ import print_function

import tensorflow.compat.v2 as tf
import tensorflow as tf

import time

Expand Down
2 changes: 1 addition & 1 deletion keras/benchmarks/model_components_benchmarks_test.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.compat.v2 as tf
import tensorflow as tf

import time

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

import tensorflow.compat.v2 as tf
import tensorflow as tf

from absl import app
from absl import flags
Expand Down
2 changes: 1 addition & 1 deletion keras/benchmarks/optimizer_benchmarks_test.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.compat.v2 as tf
import tensorflow as tf

from keras.benchmarks import benchmark_util
from keras.optimizer_v2 import adam
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from __future__ import division
from __future__ import print_function

import tensorflow.compat.v2 as tf
import tensorflow as tf
from keras.benchmarks.saved_model_benchmarks import saved_model_benchmark_util


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from __future__ import division
from __future__ import print_function

import tensorflow.compat.v2 as tf
import tensorflow as tf
from keras.benchmarks.saved_model_benchmarks import saved_model_benchmark_util


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from __future__ import division
from __future__ import print_function

import tensorflow.compat.v2 as tf
import tensorflow as tf
from keras.benchmarks.saved_model_benchmarks import saved_model_benchmark_util


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from __future__ import division
from __future__ import print_function

import tensorflow.compat.v2 as tf
import tensorflow as tf
from keras.benchmarks.saved_model_benchmarks import saved_model_benchmark_util


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from __future__ import division
from __future__ import print_function

import tensorflow.compat.v2 as tf
import tensorflow as tf
from keras.benchmarks.saved_model_benchmarks import saved_model_benchmark_util


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from __future__ import division
from __future__ import print_function

import tensorflow.compat.v2 as tf
import tensorflow as tf
from keras.benchmarks.saved_model_benchmarks import saved_model_benchmark_util


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from __future__ import division
from __future__ import print_function

import tensorflow.compat.v2 as tf
import tensorflow as tf

import tempfile
import time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from __future__ import division
from __future__ import print_function

import tensorflow.compat.v2 as tf
import tensorflow as tf
from keras.benchmarks.saved_model_benchmarks import saved_model_benchmark_util


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from __future__ import division
from __future__ import print_function

import tensorflow.compat.v2 as tf
import tensorflow as tf
from keras.benchmarks.saved_model_benchmarks import saved_model_benchmark_util


Expand Down
Loading

0 comments on commit 33f7c97

Please sign in to comment.