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 16# pylint: disable=unused-import,g-bad-import-order 17"""Classes and functions for building TensorFlow graphs.""" 18 19# Classes used when building a Graph. 20from tensorflow.python.framework.device import DeviceSpec 21from tensorflow.python.framework.ops import Graph 22from tensorflow.python.framework.ops import Operation 23from tensorflow.python.framework.ops import Tensor 24from tensorflow.python.framework.ops import IndexedSlices 25 26from tensorflow.python.framework.sparse_tensor import SparseTensor 27from tensorflow.python.framework.sparse_tensor import SparseTensorValue 28 29# Utilities used when building a Graph. 30from tensorflow.python.framework.ops import device 31from tensorflow.python.framework.ops import container 32from tensorflow.python.framework.ops import name_scope 33from tensorflow.python.framework.ops import op_scope 34from tensorflow.python.framework.ops import colocate_with 35from tensorflow.python.framework.ops import control_dependencies 36from tensorflow.python.framework.ops import get_default_graph 37from tensorflow.python.framework.ops import reset_default_graph 38from tensorflow.python.framework.ops import GraphKeys 39from tensorflow.python.framework.ops import add_to_collection 40from tensorflow.python.framework.ops import add_to_collections 41from tensorflow.python.framework.ops import get_collection 42from tensorflow.python.framework.ops import get_collection_ref 43from tensorflow.python.framework.ops import convert_to_tensor 44from tensorflow.python.framework.ops import convert_to_tensor_or_indexed_slices 45from tensorflow.python.framework.random_seed import get_seed 46from tensorflow.python.framework.random_seed import set_random_seed 47from tensorflow.python.framework.sparse_tensor import convert_to_tensor_or_sparse_tensor 48from tensorflow.python.framework.importer import import_graph_def 49 50# Utilities for working with Tensors 51from tensorflow.python.framework.tensor_util import make_tensor_proto 52from tensorflow.python.framework.tensor_util import MakeNdarray as make_ndarray 53 54# Needed when you defined a new Op in C++. 55from tensorflow.python.framework.ops import RegisterGradient 56from tensorflow.python.framework.ops import NotDifferentiable 57from tensorflow.python.framework.ops import NoGradient 58from tensorflow.python.framework.tensor_shape import Dimension 59from tensorflow.python.framework.tensor_shape import TensorShape 60 61# Needed when interfacing tensorflow to new array libraries 62from tensorflow.python.framework.ops import register_tensor_conversion_function 63 64# go/tf-wildcard-import 65# pylint: disable=wildcard-import 66from tensorflow.python.framework.dtypes import * # pylint: disable=redefined-builtin 67 68# Load a TensorFlow plugin 69from tensorflow.python.framework.load_library import * 70# pylint: enable=wildcard-import 71