Do not use unix only paths in keras/integration_test.py

All python code needs to be able to work on all operating systems, including windows.

PiperOrigin-RevId: 232317348
This commit is contained in:
Gunhan Gulsoy 2019-02-04 10:05:44 -08:00 committed by TensorFlower Gardener
parent a127a0b5ce
commit 63a13795c2

View File

@ -18,6 +18,8 @@ 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 numpy as np import numpy as np
from tensorflow.python import keras from tensorflow.python import keras
@ -236,7 +238,7 @@ class ActivationV2IntegrationTest(keras_parameterized.TestCase):
verbose=2) verbose=2)
output_path = keras.saving.saved_model.export( output_path = keras.saving.saved_model.export(
model, '/tmp/tf_keras_saved_model') model, os.path.join(self.get_temp_dir(), 'tf_keras_saved_model'))
loaded_model = keras.saving.saved_model.load_from_saved_model(output_path) loaded_model = keras.saving.saved_model.load_from_saved_model(output_path)
self.assertEqual(model.summary(), loaded_model.summary()) self.assertEqual(model.summary(), loaded_model.summary())