Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/tensorflow/_api/v2/compat/v1/compat/v1/__init__.py: 99%

693 statements  

« prev     ^ index     » next       coverage.py v7.4.0, created at 2024-01-03 07:57 +0000

1# Copyright 2015 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 the License is distributed on an "AS IS" BASIS, 

11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 

12# See the License for the specific language governing permissions and 

13# limitations under the License. 

14# ============================================================================== 

15"""Bring in all of the public TensorFlow interface into this module.""" 

16 

17import os as _os 

18import sys as _sys 

19import typing as _typing 

20 

21from tensorflow.python.tools import module_util as _module_util 

22from tensorflow.python.util.lazy_loader import LazyLoader as _LazyLoader 

23 

24# pylint: disable=g-bad-import-order 

25 

26from . import compat 

27from tensorflow._api.v2.compat.v1 import __internal__ 

28from tensorflow._api.v2.compat.v1 import app 

29from tensorflow._api.v2.compat.v1 import audio 

30from tensorflow._api.v2.compat.v1 import autograph 

31from tensorflow._api.v2.compat.v1 import bitwise 

32from tensorflow._api.v2.compat.v1 import config 

33from tensorflow._api.v2.compat.v1 import data 

34from tensorflow._api.v2.compat.v1 import debugging 

35from tensorflow._api.v2.compat.v1 import distribute 

36from tensorflow._api.v2.compat.v1 import distributions 

37from tensorflow._api.v2.compat.v1 import dtypes 

38from tensorflow._api.v2.compat.v1 import errors 

39from tensorflow._api.v2.compat.v1 import experimental 

40from tensorflow._api.v2.compat.v1 import feature_column 

41from tensorflow._api.v2.compat.v1 import gfile 

42from tensorflow._api.v2.compat.v1 import graph_util 

43from tensorflow._api.v2.compat.v1 import image 

44from tensorflow._api.v2.compat.v1 import initializers 

45from tensorflow._api.v2.compat.v1 import io 

46from tensorflow._api.v2.compat.v1 import layers 

47from tensorflow._api.v2.compat.v1 import linalg 

48from tensorflow._api.v2.compat.v1 import lite 

49from tensorflow._api.v2.compat.v1 import logging 

50from tensorflow._api.v2.compat.v1 import lookup 

51from tensorflow._api.v2.compat.v1 import losses 

52from tensorflow._api.v2.compat.v1 import manip 

53from tensorflow._api.v2.compat.v1 import math 

54from tensorflow._api.v2.compat.v1 import metrics 

55from tensorflow._api.v2.compat.v1 import mixed_precision 

56from tensorflow._api.v2.compat.v1 import mlir 

57from tensorflow._api.v2.compat.v1 import nest 

58from tensorflow._api.v2.compat.v1 import nn 

59from tensorflow._api.v2.compat.v1 import profiler 

60from tensorflow._api.v2.compat.v1 import python_io 

61from tensorflow._api.v2.compat.v1 import quantization 

62from tensorflow._api.v2.compat.v1 import queue 

63from tensorflow._api.v2.compat.v1 import ragged 

64from tensorflow._api.v2.compat.v1 import random 

65from tensorflow._api.v2.compat.v1 import raw_ops 

66from tensorflow._api.v2.compat.v1 import resource_loader 

67from tensorflow._api.v2.compat.v1 import saved_model 

68from tensorflow._api.v2.compat.v1 import sets 

69from tensorflow._api.v2.compat.v1 import signal 

70from tensorflow._api.v2.compat.v1 import sparse 

71from tensorflow._api.v2.compat.v1 import spectral 

72from tensorflow._api.v2.compat.v1 import strings 

73from tensorflow._api.v2.compat.v1 import summary 

74from tensorflow._api.v2.compat.v1 import sysconfig 

75from tensorflow._api.v2.compat.v1 import test 

76from tensorflow._api.v2.compat.v1 import tpu 

77from tensorflow._api.v2.compat.v1 import train 

78from tensorflow._api.v2.compat.v1 import types 

79from tensorflow._api.v2.compat.v1 import user_ops 

80from tensorflow._api.v2.compat.v1 import version 

81from tensorflow._api.v2.compat.v1 import xla 

82from tensorflow.core.framework.attr_value_pb2 import AttrValue 

83from tensorflow.core.framework.attr_value_pb2 import NameAttrList 

84from tensorflow.core.framework.graph_pb2 import GraphDef 

85from tensorflow.core.framework.node_def_pb2 import NodeDef 

86from tensorflow.core.framework.summary_pb2 import Summary 

87from tensorflow.core.framework.summary_pb2 import SummaryMetadata 

88from tensorflow.core.protobuf.config_pb2 import ConfigProto 

89from tensorflow.core.protobuf.config_pb2 import GPUOptions 

90from tensorflow.core.protobuf.config_pb2 import GraphOptions 

91from tensorflow.core.protobuf.config_pb2 import OptimizerOptions 

92from tensorflow.core.protobuf.config_pb2 import RunMetadata 

93from tensorflow.core.protobuf.config_pb2 import RunOptions 

94from tensorflow.core.protobuf.meta_graph_pb2 import MetaGraphDef 

95from tensorflow.core.protobuf.meta_graph_pb2 import TensorInfo 

96from tensorflow.core.util.event_pb2 import Event 

97from tensorflow.core.util.event_pb2 import LogMessage 

98from tensorflow.core.util.event_pb2 import SessionLog 

99from tensorflow.python.client.session import InteractiveSession 

100from tensorflow.python.client.session import Session 

101from tensorflow.python.compat.v2_compat import disable_v2_behavior 

102from tensorflow.python.compat.v2_compat import enable_v2_behavior 

103from tensorflow.python.data.ops.optional_ops import OptionalSpec 

104from tensorflow.python.eager.backprop import GradientTape 

105from tensorflow.python.eager.context import executing_eagerly_v1 as executing_eagerly 

106from tensorflow.python.eager.polymorphic_function.polymorphic_function import function 

107from tensorflow.python.eager.wrap_function import wrap_function 

108from tensorflow.python.framework.constant_op import constant_v1 as constant 

109from tensorflow.python.framework.device_spec import DeviceSpecV1 as DeviceSpec 

110from tensorflow.python.framework.dtypes import DType 

111from tensorflow.python.framework.dtypes import QUANTIZED_DTYPES 

112from tensorflow.python.framework.dtypes import as_dtype 

113from tensorflow.python.framework.dtypes import bfloat16 

114from tensorflow.python.framework.dtypes import bool 

115from tensorflow.python.framework.dtypes import complex128 

116from tensorflow.python.framework.dtypes import complex64 

117from tensorflow.python.framework.dtypes import double 

118from tensorflow.python.framework.dtypes import float16 

119from tensorflow.python.framework.dtypes import float32 

120from tensorflow.python.framework.dtypes import float64 

121from tensorflow.python.framework.dtypes import half 

122from tensorflow.python.framework.dtypes import int16 

123from tensorflow.python.framework.dtypes import int32 

124from tensorflow.python.framework.dtypes import int64 

125from tensorflow.python.framework.dtypes import int8 

126from tensorflow.python.framework.dtypes import qint16 

127from tensorflow.python.framework.dtypes import qint32 

128from tensorflow.python.framework.dtypes import qint8 

129from tensorflow.python.framework.dtypes import quint16 

130from tensorflow.python.framework.dtypes import quint8 

131from tensorflow.python.framework.dtypes import resource 

132from tensorflow.python.framework.dtypes import string 

133from tensorflow.python.framework.dtypes import uint16 

134from tensorflow.python.framework.dtypes import uint32 

135from tensorflow.python.framework.dtypes import uint64 

136from tensorflow.python.framework.dtypes import uint8 

137from tensorflow.python.framework.dtypes import variant 

138from tensorflow.python.framework.errors_impl import OpError 

139from tensorflow.python.framework.importer import import_graph_def 

140from tensorflow.python.framework.indexed_slices import IndexedSlices 

141from tensorflow.python.framework.indexed_slices import IndexedSlicesSpec 

142from tensorflow.python.framework.indexed_slices import convert_to_tensor_or_indexed_slices 

143from tensorflow.python.framework.load_library import load_file_system_library 

144from tensorflow.python.framework.load_library import load_library 

145from tensorflow.python.framework.load_library import load_op_library 

146from tensorflow.python.framework.ops import Graph 

147from tensorflow.python.framework.ops import GraphKeys 

148from tensorflow.python.framework.ops import Operation 

149from tensorflow.python.framework.ops import RegisterGradient 

150from tensorflow.python.framework.ops import Tensor 

151from tensorflow.python.framework.ops import _colocate_with as colocate_with 

152from tensorflow.python.framework.ops import add_to_collection 

153from tensorflow.python.framework.ops import add_to_collections 

154from tensorflow.python.framework.ops import container 

155from tensorflow.python.framework.ops import control_dependencies 

156from tensorflow.python.framework.ops import device 

157from tensorflow.python.framework.ops import disable_eager_execution 

158from tensorflow.python.framework.ops import disable_tensor_equality 

159from tensorflow.python.framework.ops import enable_eager_execution 

160from tensorflow.python.framework.ops import enable_tensor_equality 

161from tensorflow.python.framework.ops import executing_eagerly_outside_functions 

162from tensorflow.python.framework.ops import get_collection 

163from tensorflow.python.framework.ops import get_collection_ref 

164from tensorflow.python.framework.ops import get_default_graph 

165from tensorflow.python.framework.ops import init_scope 

166from tensorflow.python.framework.ops import is_symbolic_tensor 

167from tensorflow.python.framework.ops import name_scope_v1 as name_scope 

168from tensorflow.python.framework.ops import no_gradient 

169from tensorflow.python.framework.ops import no_gradient as NoGradient 

170from tensorflow.python.framework.ops import no_gradient as NotDifferentiable 

171from tensorflow.python.framework.ops import op_scope 

172from tensorflow.python.framework.ops import reset_default_graph 

173from tensorflow.python.framework.random_seed import get_seed 

174from tensorflow.python.framework.random_seed import set_random_seed 

175from tensorflow.python.framework.sparse_tensor import SparseTensor 

176from tensorflow.python.framework.sparse_tensor import SparseTensorSpec 

177from tensorflow.python.framework.sparse_tensor import SparseTensorValue 

178from tensorflow.python.framework.sparse_tensor import convert_to_tensor_or_sparse_tensor 

179from tensorflow.python.framework.stack import get_default_session 

180from tensorflow.python.framework.tensor import TensorSpec 

181from tensorflow.python.framework.tensor_conversion import convert_to_tensor_v1_with_dispatch as convert_to_tensor 

182from tensorflow.python.framework.tensor_conversion_registry import register_tensor_conversion_function 

183from tensorflow.python.framework.tensor_shape import Dimension 

184from tensorflow.python.framework.tensor_shape import TensorShape 

185from tensorflow.python.framework.tensor_shape import dimension_at_index 

186from tensorflow.python.framework.tensor_shape import dimension_value 

187from tensorflow.python.framework.tensor_shape import disable_v2_tensorshape 

188from tensorflow.python.framework.tensor_shape import enable_v2_tensorshape 

189from tensorflow.python.framework.tensor_util import MakeNdarray as make_ndarray 

190from tensorflow.python.framework.tensor_util import constant_value as get_static_value 

191from tensorflow.python.framework.tensor_util import is_tf_type as is_tensor 

192from tensorflow.python.framework.tensor_util import make_tensor_proto 

193from tensorflow.python.framework.type_spec import TypeSpec 

194from tensorflow.python.framework.type_spec import type_spec_from_value 

195from tensorflow.python.framework.versions import COMPILER_VERSION 

196from tensorflow.python.framework.versions import COMPILER_VERSION as __compiler_version__ 

197from tensorflow.python.framework.versions import CXX11_ABI_FLAG 

198from tensorflow.python.framework.versions import CXX11_ABI_FLAG as __cxx11_abi_flag__ 

199from tensorflow.python.framework.versions import CXX_VERSION 

200from tensorflow.python.framework.versions import CXX_VERSION as __cxx_version__ 

201from tensorflow.python.framework.versions import GIT_VERSION 

202from tensorflow.python.framework.versions import GIT_VERSION as __git_version__ 

203from tensorflow.python.framework.versions import GRAPH_DEF_VERSION 

204from tensorflow.python.framework.versions import GRAPH_DEF_VERSION_MIN_CONSUMER 

205from tensorflow.python.framework.versions import GRAPH_DEF_VERSION_MIN_PRODUCER 

206from tensorflow.python.framework.versions import MONOLITHIC_BUILD 

207from tensorflow.python.framework.versions import MONOLITHIC_BUILD as __monolithic_build__ 

208from tensorflow.python.framework.versions import VERSION 

209from tensorflow.python.framework.versions import VERSION as __version__ 

210from tensorflow.python.module.module import Module 

211from tensorflow.python.ops.array_ops import batch_gather 

212from tensorflow.python.ops.array_ops import batch_to_space 

213from tensorflow.python.ops.array_ops import boolean_mask 

214from tensorflow.python.ops.array_ops import broadcast_dynamic_shape 

215from tensorflow.python.ops.array_ops import broadcast_static_shape 

216from tensorflow.python.ops.array_ops import concat 

217from tensorflow.python.ops.array_ops import depth_to_space 

218from tensorflow.python.ops.array_ops import dequantize 

219from tensorflow.python.ops.array_ops import edit_distance 

220from tensorflow.python.ops.array_ops import expand_dims 

221from tensorflow.python.ops.array_ops import extract_image_patches 

222from tensorflow.python.ops.array_ops import fill 

223from tensorflow.python.ops.array_ops import fingerprint 

224from tensorflow.python.ops.array_ops import gather 

225from tensorflow.python.ops.array_ops import gather_nd 

226from tensorflow.python.ops.array_ops import guarantee_const 

227from tensorflow.python.ops.array_ops import identity 

228from tensorflow.python.ops.array_ops import matrix_diag 

229from tensorflow.python.ops.array_ops import matrix_diag_part 

230from tensorflow.python.ops.array_ops import matrix_set_diag 

231from tensorflow.python.ops.array_ops import matrix_transpose 

232from tensorflow.python.ops.array_ops import meshgrid 

233from tensorflow.python.ops.array_ops import newaxis 

234from tensorflow.python.ops.array_ops import one_hot 

235from tensorflow.python.ops.array_ops import ones 

236from tensorflow.python.ops.array_ops import ones_like 

237from tensorflow.python.ops.array_ops import pad 

238from tensorflow.python.ops.array_ops import parallel_stack 

239from tensorflow.python.ops.array_ops import placeholder 

240from tensorflow.python.ops.array_ops import placeholder_with_default 

241from tensorflow.python.ops.array_ops import quantize 

242from tensorflow.python.ops.array_ops import quantize_v2 

243from tensorflow.python.ops.array_ops import rank 

244from tensorflow.python.ops.array_ops import repeat 

245from tensorflow.python.ops.array_ops import required_space_to_batch_paddings 

246from tensorflow.python.ops.array_ops import reshape 

247from tensorflow.python.ops.array_ops import reverse_sequence 

248from tensorflow.python.ops.array_ops import searchsorted 

249from tensorflow.python.ops.array_ops import sequence_mask 

250from tensorflow.python.ops.array_ops import setdiff1d 

251from tensorflow.python.ops.array_ops import shape 

252from tensorflow.python.ops.array_ops import shape_n 

253from tensorflow.python.ops.array_ops import size 

254from tensorflow.python.ops.array_ops import slice 

255from tensorflow.python.ops.array_ops import space_to_batch 

256from tensorflow.python.ops.array_ops import space_to_depth 

257from tensorflow.python.ops.array_ops import sparse_mask 

258from tensorflow.python.ops.array_ops import sparse_placeholder 

259from tensorflow.python.ops.array_ops import split 

260from tensorflow.python.ops.array_ops import squeeze 

261from tensorflow.python.ops.array_ops import stop_gradient 

262from tensorflow.python.ops.array_ops import strided_slice 

263from tensorflow.python.ops.array_ops import tensor_diag_part as diag_part 

264from tensorflow.python.ops.array_ops import tensor_scatter_nd_update 

265from tensorflow.python.ops.array_ops import tensor_scatter_nd_update as tensor_scatter_update 

266from tensorflow.python.ops.array_ops import transpose 

267from tensorflow.python.ops.array_ops import unique 

268from tensorflow.python.ops.array_ops import unique_with_counts 

269from tensorflow.python.ops.array_ops import where 

270from tensorflow.python.ops.array_ops import where_v2 

271from tensorflow.python.ops.array_ops import zeros 

272from tensorflow.python.ops.array_ops import zeros_like 

273from tensorflow.python.ops.array_ops_stack import stack 

274from tensorflow.python.ops.array_ops_stack import unstack 

275from tensorflow.python.ops.batch_ops import batch_function as nondifferentiable_batch_function 

276from tensorflow.python.ops.bincount_ops import bincount_v1 as bincount 

277from tensorflow.python.ops.check_ops import assert_equal 

278from tensorflow.python.ops.check_ops import assert_greater 

279from tensorflow.python.ops.check_ops import assert_greater_equal 

280from tensorflow.python.ops.check_ops import assert_integer 

281from tensorflow.python.ops.check_ops import assert_less 

282from tensorflow.python.ops.check_ops import assert_less_equal 

283from tensorflow.python.ops.check_ops import assert_near 

284from tensorflow.python.ops.check_ops import assert_negative 

285from tensorflow.python.ops.check_ops import assert_non_negative 

286from tensorflow.python.ops.check_ops import assert_non_positive 

287from tensorflow.python.ops.check_ops import assert_none_equal 

288from tensorflow.python.ops.check_ops import assert_positive 

289from tensorflow.python.ops.check_ops import assert_proper_iterable 

290from tensorflow.python.ops.check_ops import assert_rank 

291from tensorflow.python.ops.check_ops import assert_rank_at_least 

292from tensorflow.python.ops.check_ops import assert_rank_in 

293from tensorflow.python.ops.check_ops import assert_same_float_dtype 

294from tensorflow.python.ops.check_ops import assert_scalar 

295from tensorflow.python.ops.check_ops import assert_type 

296from tensorflow.python.ops.check_ops import ensure_shape 

297from tensorflow.python.ops.check_ops import is_non_decreasing 

298from tensorflow.python.ops.check_ops import is_numeric_tensor 

299from tensorflow.python.ops.check_ops import is_strictly_increasing 

300from tensorflow.python.ops.clip_ops import clip_by_average_norm 

301from tensorflow.python.ops.clip_ops import clip_by_global_norm 

302from tensorflow.python.ops.clip_ops import clip_by_norm 

303from tensorflow.python.ops.clip_ops import clip_by_value 

304from tensorflow.python.ops.clip_ops import global_norm 

305from tensorflow.python.ops.cond import cond 

306from tensorflow.python.ops.confusion_matrix import confusion_matrix_v1 as confusion_matrix 

307from tensorflow.python.ops.control_flow_assert import Assert 

308from tensorflow.python.ops.control_flow_case import case 

309from tensorflow.python.ops.control_flow_ops import group 

310from tensorflow.python.ops.control_flow_ops import tuple 

311from tensorflow.python.ops.control_flow_switch_case import switch_case 

312from tensorflow.python.ops.control_flow_v2_toggles import control_flow_v2_enabled 

313from tensorflow.python.ops.control_flow_v2_toggles import disable_control_flow_v2 

314from tensorflow.python.ops.control_flow_v2_toggles import enable_control_flow_v2 

315from tensorflow.python.ops.critical_section_ops import CriticalSection 

316from tensorflow.python.ops.custom_gradient import custom_gradient 

317from tensorflow.python.ops.custom_gradient import grad_pass_through 

318from tensorflow.python.ops.custom_gradient import recompute_grad 

319from tensorflow.python.ops.data_flow_ops import ConditionalAccumulator 

320from tensorflow.python.ops.data_flow_ops import ConditionalAccumulatorBase 

321from tensorflow.python.ops.data_flow_ops import FIFOQueue 

322from tensorflow.python.ops.data_flow_ops import PaddingFIFOQueue 

323from tensorflow.python.ops.data_flow_ops import PriorityQueue 

324from tensorflow.python.ops.data_flow_ops import QueueBase 

325from tensorflow.python.ops.data_flow_ops import RandomShuffleQueue 

326from tensorflow.python.ops.data_flow_ops import SparseConditionalAccumulator 

327from tensorflow.python.ops.functional_ops import foldl 

328from tensorflow.python.ops.functional_ops import foldr 

329from tensorflow.python.ops.functional_ops import scan 

330from tensorflow.python.ops.gen_array_ops import batch_to_space_nd 

331from tensorflow.python.ops.gen_array_ops import bitcast 

332from tensorflow.python.ops.gen_array_ops import broadcast_to 

333from tensorflow.python.ops.gen_array_ops import check_numerics 

334from tensorflow.python.ops.gen_array_ops import diag 

335from tensorflow.python.ops.gen_array_ops import extract_volume_patches 

336from tensorflow.python.ops.gen_array_ops import fake_quant_with_min_max_args 

337from tensorflow.python.ops.gen_array_ops import fake_quant_with_min_max_args_gradient 

338from tensorflow.python.ops.gen_array_ops import fake_quant_with_min_max_vars 

339from tensorflow.python.ops.gen_array_ops import fake_quant_with_min_max_vars_gradient 

340from tensorflow.python.ops.gen_array_ops import fake_quant_with_min_max_vars_per_channel 

341from tensorflow.python.ops.gen_array_ops import fake_quant_with_min_max_vars_per_channel_gradient 

342from tensorflow.python.ops.gen_array_ops import identity_n 

343from tensorflow.python.ops.gen_array_ops import invert_permutation 

344from tensorflow.python.ops.gen_array_ops import matrix_band_part 

345from tensorflow.python.ops.gen_array_ops import quantized_concat 

346from tensorflow.python.ops.gen_array_ops import reverse_v2 

347from tensorflow.python.ops.gen_array_ops import reverse_v2 as reverse 

348from tensorflow.python.ops.gen_array_ops import scatter_nd 

349from tensorflow.python.ops.gen_array_ops import space_to_batch_nd 

350from tensorflow.python.ops.gen_array_ops import tensor_scatter_add 

351from tensorflow.python.ops.gen_array_ops import tensor_scatter_add as tensor_scatter_nd_add 

352from tensorflow.python.ops.gen_array_ops import tensor_scatter_max as tensor_scatter_nd_max 

353from tensorflow.python.ops.gen_array_ops import tensor_scatter_min as tensor_scatter_nd_min 

354from tensorflow.python.ops.gen_array_ops import tensor_scatter_sub 

355from tensorflow.python.ops.gen_array_ops import tensor_scatter_sub as tensor_scatter_nd_sub 

356from tensorflow.python.ops.gen_array_ops import tile 

357from tensorflow.python.ops.gen_array_ops import unravel_index 

358from tensorflow.python.ops.gen_control_flow_ops import no_op 

359from tensorflow.python.ops.gen_data_flow_ops import dynamic_partition 

360from tensorflow.python.ops.gen_data_flow_ops import dynamic_stitch 

361from tensorflow.python.ops.gen_io_ops import matching_files 

362from tensorflow.python.ops.gen_io_ops import write_file 

363from tensorflow.python.ops.gen_linalg_ops import cholesky 

364from tensorflow.python.ops.gen_linalg_ops import matrix_determinant 

365from tensorflow.python.ops.gen_linalg_ops import matrix_inverse 

366from tensorflow.python.ops.gen_linalg_ops import matrix_solve 

367from tensorflow.python.ops.gen_linalg_ops import matrix_square_root 

368from tensorflow.python.ops.gen_linalg_ops import qr 

369from tensorflow.python.ops.gen_logging_ops import timestamp 

370from tensorflow.python.ops.gen_math_ops import acosh 

371from tensorflow.python.ops.gen_math_ops import arg_max 

372from tensorflow.python.ops.gen_math_ops import arg_min 

373from tensorflow.python.ops.gen_math_ops import asin 

374from tensorflow.python.ops.gen_math_ops import asinh 

375from tensorflow.python.ops.gen_math_ops import atan 

376from tensorflow.python.ops.gen_math_ops import atan2 

377from tensorflow.python.ops.gen_math_ops import atanh 

378from tensorflow.python.ops.gen_math_ops import betainc 

379from tensorflow.python.ops.gen_math_ops import cos 

380from tensorflow.python.ops.gen_math_ops import cosh 

381from tensorflow.python.ops.gen_math_ops import cross 

382from tensorflow.python.ops.gen_math_ops import digamma 

383from tensorflow.python.ops.gen_math_ops import erf 

384from tensorflow.python.ops.gen_math_ops import erfc 

385from tensorflow.python.ops.gen_math_ops import expm1 

386from tensorflow.python.ops.gen_math_ops import floor_div 

387from tensorflow.python.ops.gen_math_ops import floor_mod as floormod 

388from tensorflow.python.ops.gen_math_ops import floor_mod as mod 

389from tensorflow.python.ops.gen_math_ops import greater 

390from tensorflow.python.ops.gen_math_ops import greater_equal 

391from tensorflow.python.ops.gen_math_ops import igamma 

392from tensorflow.python.ops.gen_math_ops import igammac 

393from tensorflow.python.ops.gen_math_ops import is_finite 

394from tensorflow.python.ops.gen_math_ops import is_inf 

395from tensorflow.python.ops.gen_math_ops import is_nan 

396from tensorflow.python.ops.gen_math_ops import less 

397from tensorflow.python.ops.gen_math_ops import less_equal 

398from tensorflow.python.ops.gen_math_ops import lgamma 

399from tensorflow.python.ops.gen_math_ops import log 

400from tensorflow.python.ops.gen_math_ops import log1p 

401from tensorflow.python.ops.gen_math_ops import logical_and 

402from tensorflow.python.ops.gen_math_ops import logical_not 

403from tensorflow.python.ops.gen_math_ops import logical_or 

404from tensorflow.python.ops.gen_math_ops import maximum 

405from tensorflow.python.ops.gen_math_ops import minimum 

406from tensorflow.python.ops.gen_math_ops import neg as negative 

407from tensorflow.python.ops.gen_math_ops import polygamma 

408from tensorflow.python.ops.gen_math_ops import real_div as realdiv 

409from tensorflow.python.ops.gen_math_ops import reciprocal 

410from tensorflow.python.ops.gen_math_ops import rint 

411from tensorflow.python.ops.gen_math_ops import segment_max 

412from tensorflow.python.ops.gen_math_ops import segment_mean 

413from tensorflow.python.ops.gen_math_ops import segment_min 

414from tensorflow.python.ops.gen_math_ops import segment_prod 

415from tensorflow.python.ops.gen_math_ops import segment_sum 

416from tensorflow.python.ops.gen_math_ops import sin 

417from tensorflow.python.ops.gen_math_ops import sinh 

418from tensorflow.python.ops.gen_math_ops import sparse_mat_mul as sparse_matmul 

419from tensorflow.python.ops.gen_math_ops import square 

420from tensorflow.python.ops.gen_math_ops import squared_difference 

421from tensorflow.python.ops.gen_math_ops import tan 

422from tensorflow.python.ops.gen_math_ops import tanh 

423from tensorflow.python.ops.gen_math_ops import truncate_div as truncatediv 

424from tensorflow.python.ops.gen_math_ops import truncate_mod as truncatemod 

425from tensorflow.python.ops.gen_math_ops import unsorted_segment_max 

426from tensorflow.python.ops.gen_math_ops import unsorted_segment_min 

427from tensorflow.python.ops.gen_math_ops import unsorted_segment_prod 

428from tensorflow.python.ops.gen_math_ops import unsorted_segment_sum 

429from tensorflow.python.ops.gen_math_ops import zeta 

430from tensorflow.python.ops.gen_nn_ops import approx_top_k 

431from tensorflow.python.ops.gen_nn_ops import conv2d_backprop_filter_v2 

432from tensorflow.python.ops.gen_nn_ops import conv2d_backprop_input_v2 

433from tensorflow.python.ops.gen_parsing_ops import decode_compressed 

434from tensorflow.python.ops.gen_parsing_ops import parse_tensor 

435from tensorflow.python.ops.gen_ragged_array_ops import ragged_fill_empty_rows 

436from tensorflow.python.ops.gen_ragged_array_ops import ragged_fill_empty_rows_grad 

437from tensorflow.python.ops.gen_random_index_shuffle_ops import random_index_shuffle 

438from tensorflow.python.ops.gen_spectral_ops import fft 

439from tensorflow.python.ops.gen_spectral_ops import fft2d 

440from tensorflow.python.ops.gen_spectral_ops import fft3d 

441from tensorflow.python.ops.gen_spectral_ops import ifft 

442from tensorflow.python.ops.gen_spectral_ops import ifft2d 

443from tensorflow.python.ops.gen_spectral_ops import ifft3d 

444from tensorflow.python.ops.gen_string_ops import as_string 

445from tensorflow.python.ops.gen_string_ops import decode_base64 

446from tensorflow.python.ops.gen_string_ops import encode_base64 

447from tensorflow.python.ops.gen_string_ops import string_strip 

448from tensorflow.python.ops.gen_string_ops import string_to_hash_bucket_fast 

449from tensorflow.python.ops.gen_string_ops import string_to_hash_bucket_strong 

450from tensorflow.python.ops.gradients_impl import gradients 

451from tensorflow.python.ops.gradients_impl import hessians 

452from tensorflow.python.ops.gradients_util import AggregationMethod 

453from tensorflow.python.ops.histogram_ops import histogram_fixed_width 

454from tensorflow.python.ops.histogram_ops import histogram_fixed_width_bins 

455from tensorflow.python.ops.init_ops import Constant as constant_initializer 

456from tensorflow.python.ops.init_ops import GlorotNormal as glorot_normal_initializer 

457from tensorflow.python.ops.init_ops import GlorotUniform as glorot_uniform_initializer 

458from tensorflow.python.ops.init_ops import Ones as ones_initializer 

459from tensorflow.python.ops.init_ops import Orthogonal as orthogonal_initializer 

460from tensorflow.python.ops.init_ops import RandomNormal as random_normal_initializer 

461from tensorflow.python.ops.init_ops import RandomUniform as random_uniform_initializer 

462from tensorflow.python.ops.init_ops import TruncatedNormal as truncated_normal_initializer 

463from tensorflow.python.ops.init_ops import UniformUnitScaling as uniform_unit_scaling_initializer 

464from tensorflow.python.ops.init_ops import VarianceScaling as variance_scaling_initializer 

465from tensorflow.python.ops.init_ops import Zeros as zeros_initializer 

466from tensorflow.python.ops.io_ops import FixedLengthRecordReader 

467from tensorflow.python.ops.io_ops import IdentityReader 

468from tensorflow.python.ops.io_ops import LMDBReader 

469from tensorflow.python.ops.io_ops import ReaderBase 

470from tensorflow.python.ops.io_ops import TFRecordReader 

471from tensorflow.python.ops.io_ops import TextLineReader 

472from tensorflow.python.ops.io_ops import WholeFileReader 

473from tensorflow.python.ops.io_ops import read_file 

474from tensorflow.python.ops.io_ops import serialize_tensor 

475from tensorflow.python.ops.linalg_ops import cholesky_solve 

476from tensorflow.python.ops.linalg_ops import eye 

477from tensorflow.python.ops.linalg_ops import matrix_solve_ls 

478from tensorflow.python.ops.linalg_ops import matrix_triangular_solve 

479from tensorflow.python.ops.linalg_ops import norm 

480from tensorflow.python.ops.linalg_ops import self_adjoint_eig 

481from tensorflow.python.ops.linalg_ops import self_adjoint_eigvals 

482from tensorflow.python.ops.linalg_ops import svd 

483from tensorflow.python.ops.logging_ops import Print 

484from tensorflow.python.ops.logging_ops import print_v2 as print 

485from tensorflow.python.ops.lookup_ops import initialize_all_tables 

486from tensorflow.python.ops.lookup_ops import tables_initializer 

487from tensorflow.python.ops.manip_ops import roll 

488from tensorflow.python.ops.map_fn import map_fn 

489from tensorflow.python.ops.math_ops import abs 

490from tensorflow.python.ops.math_ops import accumulate_n 

491from tensorflow.python.ops.math_ops import acos 

492from tensorflow.python.ops.math_ops import add 

493from tensorflow.python.ops.math_ops import add_n 

494from tensorflow.python.ops.math_ops import angle 

495from tensorflow.python.ops.math_ops import argmax 

496from tensorflow.python.ops.math_ops import argmin 

497from tensorflow.python.ops.math_ops import cast 

498from tensorflow.python.ops.math_ops import ceil 

499from tensorflow.python.ops.math_ops import complex 

500from tensorflow.python.ops.math_ops import conj 

501from tensorflow.python.ops.math_ops import count_nonzero 

502from tensorflow.python.ops.math_ops import cumprod 

503from tensorflow.python.ops.math_ops import cumsum 

504from tensorflow.python.ops.math_ops import div 

505from tensorflow.python.ops.math_ops import div_no_nan 

506from tensorflow.python.ops.math_ops import divide 

507from tensorflow.python.ops.math_ops import equal 

508from tensorflow.python.ops.math_ops import exp 

509from tensorflow.python.ops.math_ops import floor 

510from tensorflow.python.ops.math_ops import floordiv 

511from tensorflow.python.ops.math_ops import imag 

512from tensorflow.python.ops.math_ops import linspace_nd as lin_space 

513from tensorflow.python.ops.math_ops import linspace_nd as linspace 

514from tensorflow.python.ops.math_ops import log_sigmoid 

515from tensorflow.python.ops.math_ops import logical_xor 

516from tensorflow.python.ops.math_ops import matmul 

517from tensorflow.python.ops.math_ops import multiply 

518from tensorflow.python.ops.math_ops import not_equal 

519from tensorflow.python.ops.math_ops import pow 

520from tensorflow.python.ops.math_ops import range 

521from tensorflow.python.ops.math_ops import real 

522from tensorflow.python.ops.math_ops import reduce_all_v1 as reduce_all 

523from tensorflow.python.ops.math_ops import reduce_any_v1 as reduce_any 

524from tensorflow.python.ops.math_ops import reduce_logsumexp_v1 as reduce_logsumexp 

525from tensorflow.python.ops.math_ops import reduce_max_v1 as reduce_max 

526from tensorflow.python.ops.math_ops import reduce_mean_v1 as reduce_mean 

527from tensorflow.python.ops.math_ops import reduce_min_v1 as reduce_min 

528from tensorflow.python.ops.math_ops import reduce_prod_v1 as reduce_prod 

529from tensorflow.python.ops.math_ops import reduce_sum_v1 as reduce_sum 

530from tensorflow.python.ops.math_ops import round 

531from tensorflow.python.ops.math_ops import rsqrt 

532from tensorflow.python.ops.math_ops import saturate_cast 

533from tensorflow.python.ops.math_ops import scalar_mul 

534from tensorflow.python.ops.math_ops import sigmoid 

535from tensorflow.python.ops.math_ops import sign 

536from tensorflow.python.ops.math_ops import sparse_segment_mean 

537from tensorflow.python.ops.math_ops import sparse_segment_sqrt_n 

538from tensorflow.python.ops.math_ops import sparse_segment_sum 

539from tensorflow.python.ops.math_ops import sqrt 

540from tensorflow.python.ops.math_ops import subtract 

541from tensorflow.python.ops.math_ops import tensordot 

542from tensorflow.python.ops.math_ops import to_bfloat16 

543from tensorflow.python.ops.math_ops import to_complex128 

544from tensorflow.python.ops.math_ops import to_complex64 

545from tensorflow.python.ops.math_ops import to_double 

546from tensorflow.python.ops.math_ops import to_float 

547from tensorflow.python.ops.math_ops import to_int32 

548from tensorflow.python.ops.math_ops import to_int64 

549from tensorflow.python.ops.math_ops import trace 

550from tensorflow.python.ops.math_ops import truediv 

551from tensorflow.python.ops.math_ops import unsorted_segment_mean 

552from tensorflow.python.ops.math_ops import unsorted_segment_sqrt_n 

553from tensorflow.python.ops.numerics import add_check_numerics_ops 

554from tensorflow.python.ops.numerics import verify_tensor_all_finite 

555from tensorflow.python.ops.parallel_for.control_flow_ops import vectorized_map 

556from tensorflow.python.ops.parsing_config import FixedLenFeature 

557from tensorflow.python.ops.parsing_config import FixedLenSequenceFeature 

558from tensorflow.python.ops.parsing_config import SparseFeature 

559from tensorflow.python.ops.parsing_config import VarLenFeature 

560from tensorflow.python.ops.parsing_ops import decode_csv 

561from tensorflow.python.ops.parsing_ops import decode_json_example 

562from tensorflow.python.ops.parsing_ops import decode_raw_v1 as decode_raw 

563from tensorflow.python.ops.parsing_ops import parse_example 

564from tensorflow.python.ops.parsing_ops import parse_single_example 

565from tensorflow.python.ops.parsing_ops import parse_single_sequence_example 

566from tensorflow.python.ops.partitioned_variables import create_partitioned_variables 

567from tensorflow.python.ops.partitioned_variables import fixed_size_partitioner 

568from tensorflow.python.ops.partitioned_variables import min_max_variable_partitioner 

569from tensorflow.python.ops.partitioned_variables import variable_axis_size_partitioner 

570from tensorflow.python.ops.ragged.ragged_string_ops import string_split 

571from tensorflow.python.ops.ragged.ragged_tensor import RaggedTensor 

572from tensorflow.python.ops.ragged.ragged_tensor import RaggedTensorSpec 

573from tensorflow.python.ops.random_ops import multinomial 

574from tensorflow.python.ops.random_ops import random_crop 

575from tensorflow.python.ops.random_ops import random_gamma 

576from tensorflow.python.ops.random_ops import random_normal 

577from tensorflow.python.ops.random_ops import random_poisson 

578from tensorflow.python.ops.random_ops import random_shuffle 

579from tensorflow.python.ops.random_ops import random_uniform 

580from tensorflow.python.ops.random_ops import truncated_normal 

581from tensorflow.python.ops.script_ops import eager_py_func as py_function 

582from tensorflow.python.ops.script_ops import numpy_function 

583from tensorflow.python.ops.script_ops import py_func 

584from tensorflow.python.ops.session_ops import delete_session_tensor 

585from tensorflow.python.ops.session_ops import get_session_handle 

586from tensorflow.python.ops.session_ops import get_session_tensor 

587from tensorflow.python.ops.sort_ops import argsort 

588from tensorflow.python.ops.sort_ops import sort 

589from tensorflow.python.ops.sparse_ops import deserialize_many_sparse 

590from tensorflow.python.ops.sparse_ops import serialize_many_sparse 

591from tensorflow.python.ops.sparse_ops import serialize_sparse 

592from tensorflow.python.ops.sparse_ops import sparse_add 

593from tensorflow.python.ops.sparse_ops import sparse_concat 

594from tensorflow.python.ops.sparse_ops import sparse_fill_empty_rows 

595from tensorflow.python.ops.sparse_ops import sparse_maximum 

596from tensorflow.python.ops.sparse_ops import sparse_merge 

597from tensorflow.python.ops.sparse_ops import sparse_minimum 

598from tensorflow.python.ops.sparse_ops import sparse_reduce_max 

599from tensorflow.python.ops.sparse_ops import sparse_reduce_max_sparse 

600from tensorflow.python.ops.sparse_ops import sparse_reduce_sum 

601from tensorflow.python.ops.sparse_ops import sparse_reduce_sum_sparse 

602from tensorflow.python.ops.sparse_ops import sparse_reorder 

603from tensorflow.python.ops.sparse_ops import sparse_reset_shape 

604from tensorflow.python.ops.sparse_ops import sparse_reshape 

605from tensorflow.python.ops.sparse_ops import sparse_retain 

606from tensorflow.python.ops.sparse_ops import sparse_slice 

607from tensorflow.python.ops.sparse_ops import sparse_softmax 

608from tensorflow.python.ops.sparse_ops import sparse_split 

609from tensorflow.python.ops.sparse_ops import sparse_tensor_dense_matmul 

610from tensorflow.python.ops.sparse_ops import sparse_tensor_to_dense 

611from tensorflow.python.ops.sparse_ops import sparse_to_dense 

612from tensorflow.python.ops.sparse_ops import sparse_to_indicator 

613from tensorflow.python.ops.sparse_ops import sparse_transpose 

614from tensorflow.python.ops.special_math_ops import einsum 

615from tensorflow.python.ops.special_math_ops import lbeta 

616from tensorflow.python.ops.state_ops import assign 

617from tensorflow.python.ops.state_ops import assign_add 

618from tensorflow.python.ops.state_ops import assign_sub 

619from tensorflow.python.ops.state_ops import batch_scatter_update 

620from tensorflow.python.ops.state_ops import count_up_to 

621from tensorflow.python.ops.state_ops import scatter_add 

622from tensorflow.python.ops.state_ops import scatter_div 

623from tensorflow.python.ops.state_ops import scatter_max 

624from tensorflow.python.ops.state_ops import scatter_min 

625from tensorflow.python.ops.state_ops import scatter_mul 

626from tensorflow.python.ops.state_ops import scatter_nd_add 

627from tensorflow.python.ops.state_ops import scatter_nd_sub 

628from tensorflow.python.ops.state_ops import scatter_nd_update 

629from tensorflow.python.ops.state_ops import scatter_sub 

630from tensorflow.python.ops.state_ops import scatter_update 

631from tensorflow.python.ops.string_ops import reduce_join 

632from tensorflow.python.ops.string_ops import regex_replace 

633from tensorflow.python.ops.string_ops import string_join 

634from tensorflow.python.ops.string_ops import string_to_hash_bucket_v1 as string_to_hash_bucket 

635from tensorflow.python.ops.string_ops import string_to_number_v1 as string_to_number 

636from tensorflow.python.ops.string_ops import substr_deprecated as substr 

637from tensorflow.python.ops.template import make_template 

638from tensorflow.python.ops.tensor_array_ops import TensorArray 

639from tensorflow.python.ops.tensor_array_ops import TensorArraySpec 

640from tensorflow.python.ops.unconnected_gradients import UnconnectedGradients 

641from tensorflow.python.ops.variable_scope import AUTO_REUSE 

642from tensorflow.python.ops.variable_scope import VariableScope 

643from tensorflow.python.ops.variable_scope import disable_resource_variables 

644from tensorflow.python.ops.variable_scope import enable_resource_variables 

645from tensorflow.python.ops.variable_scope import get_local_variable 

646from tensorflow.python.ops.variable_scope import get_variable 

647from tensorflow.python.ops.variable_scope import get_variable_scope 

648from tensorflow.python.ops.variable_scope import no_regularizer 

649from tensorflow.python.ops.variable_scope import resource_variables_enabled 

650from tensorflow.python.ops.variable_scope import variable_creator_scope_v1 as variable_creator_scope 

651from tensorflow.python.ops.variable_scope import variable_op_scope 

652from tensorflow.python.ops.variable_scope import variable_scope 

653from tensorflow.python.ops.variable_v1 import VariableV1 as Variable 

654from tensorflow.python.ops.variable_v1 import is_variable_initialized 

655from tensorflow.python.ops.variables import VariableAggregation 

656from tensorflow.python.ops.variables import VariableSynchronization 

657from tensorflow.python.ops.variables import all_variables 

658from tensorflow.python.ops.variables import assert_variables_initialized 

659from tensorflow.python.ops.variables import global_variables 

660from tensorflow.python.ops.variables import global_variables_initializer 

661from tensorflow.python.ops.variables import initialize_all_variables 

662from tensorflow.python.ops.variables import initialize_local_variables 

663from tensorflow.python.ops.variables import initialize_variables 

664from tensorflow.python.ops.variables import local_variables 

665from tensorflow.python.ops.variables import local_variables_initializer 

666from tensorflow.python.ops.variables import model_variables 

667from tensorflow.python.ops.variables import moving_average_variables 

668from tensorflow.python.ops.variables import report_uninitialized_variables 

669from tensorflow.python.ops.variables import trainable_variables 

670from tensorflow.python.ops.variables import variables_initializer 

671from tensorflow.python.ops.while_loop import while_loop 

672from tensorflow.python.platform.tf_logging import get_logger 

673from tensorflow.tsl.protobuf.histogram_pb2 import HistogramProto 

674 

675# WRAPPER_PLACEHOLDER 

676 

677# Hook external TensorFlow modules. 

678_current_module = _sys.modules[__name__] 

679 

680# Lazy-load estimator. 

681_estimator_module = "tensorflow_estimator.python.estimator.api._v1.estimator" 

682estimator = _LazyLoader("estimator", globals(), _estimator_module) 

683_module_dir = _module_util.get_parent_dir_for_name(_estimator_module) 

684if _module_dir: 

685 _current_module.__path__ = [_module_dir] + _current_module.__path__ 

686setattr(_current_module, "estimator", estimator) 

687 

688_keras_module = "keras.api._v1.keras" 

689keras = _LazyLoader("keras", globals(), _keras_module) 

690_module_dir = _module_util.get_parent_dir_for_name(_keras_module) 

691if _module_dir: 

692 _current_module.__path__ = [_module_dir] + _current_module.__path__ 

693setattr(_current_module, "keras", keras) 

694 

695from tensorflow.python.platform import flags # pylint: disable=g-import-not-at-top 

696_current_module.app.flags = flags # pylint: disable=undefined-variable 

697setattr(_current_module, "flags", flags) 

698 

699# Add module aliases from Keras to TF. 

700# Some tf endpoints actually lives under Keras. 

701if hasattr(_current_module, "keras"): 

702 # It is possible that keras is a lazily loaded module, which might break when 

703 # actually trying to import it. Have a Try-Catch to make sure it doesn't break 

704 # when it doing some very initial loading, like tf.compat.v2, etc. 

705 try: 

706 _layer_package = "keras.api._v1.keras.__internal__.legacy.layers" 

707 layers = _LazyLoader("layers", globals(), _layer_package) 

708 _module_dir = _module_util.get_parent_dir_for_name(_layer_package) 

709 if _module_dir: 

710 _current_module.__path__ = [_module_dir] + _current_module.__path__ 

711 setattr(_current_module, "layers", layers) 

712 

713 _legacy_rnn_package = "keras.api._v1.keras.__internal__.legacy.rnn_cell" 

714 _rnn_cell = _LazyLoader("legacy_rnn", globals(), _legacy_rnn_package) 

715 _module_dir = _module_util.get_parent_dir_for_name(_legacy_rnn_package) 

716 if _module_dir: 

717 _current_module.nn.__path__ = [_module_dir] + _current_module.nn.__path__ 

718 _current_module.nn.rnn_cell = _rnn_cell 

719 except ImportError: 

720 pass 

721 

722# Explicitly import lazy-loaded modules to support autocompletion. 

723# pylint: disable=g-import-not-at-top 

724if _typing.TYPE_CHECKING: 

725 from tensorflow_estimator.python.estimator.api._v1 import estimator as estimator 

726 from keras.api._v1 import keras 

727 from keras.api._v1.keras import losses 

728 from keras.api._v1.keras import metrics 

729 from keras.api._v1.keras import optimizers 

730 from keras.api._v1.keras import initializers 

731# pylint: enable=g-import-not-at-top