simple_save_test.py
imports osimports tensorflow.python.platform
SHA-2569ff6d6cfefe371b8c2e504084a49900ed1238b433337fccae0ad9b006cc554c6
MaleculeH(Cm)Md(In₃)
Evidence
1# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under …
11:46… D, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14# ============================================================ …
14:80… =
15"""Tests for SavedModel simple save functionality."""
16
17import os
18
19from tensorflow.python.framework import ops
20from tensorflow.python.ops import variables
21from tensorflow.python.platform import test
22from tensorflow.python.saved_model import loader
23from tensorflow.python.saved_model import signature_constants
24from tensorflow.python.saved_model import simple_save
25from tensorflow.python.saved_model import tag_constants
26
27
28class SimpleSaveTest(test.TestCase):
29
30 def _init_and_validate_variable(self, variable_name, …
39:29… ual_variable.shape), len(expected_variable.shape))
40 for i in range(len(actual_variable.shape)):
41 self.assertEqual(actual_variable.shape[i], expected_variable.shape[i])
42
43 def _check_tensor_info …
50:21… expected_tensor.shape[i])
51
52 def testSimpleSave(self):
53 """Test simple_save that uses the default parameters."""
54 export_dir = os.path.join(test.get_temp_dir(),
55 "test_simple_save")
56
57 # Force the test to …