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