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