本文整理汇总了Python中tensorflow.python.util.all_util.make_all函数的典型用法代码示例。如果您正苦于以下问题:Python make_all函数的具体用法?Python make_all怎么用?Python make_all使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了make_all函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: make_all
# Distributed computing support
from tensorflow.core.protobuf.tensorflow_server_pb2 import ClusterDef
from tensorflow.core.protobuf.tensorflow_server_pb2 import JobDef
from tensorflow.core.protobuf.tensorflow_server_pb2 import ServerDef
from tensorflow.python.training.server_lib import ClusterSpec
from tensorflow.python.training.server_lib import Server
from tensorflow.python.util.all_util import make_all
# Include extra modules for docstrings because:
# * Input methods in tf.train are documented in io_ops.
# * Saver methods in tf.train are documented in state_ops.
__all__ = make_all(__name__, [sys.modules[__name__], io_ops, state_ops])
# Symbols whitelisted for export without documentation.
# TODO(cwhipkey): review these and move to contrib or expose through
# documentation.
__all__.extend(
[
"BytesList",
"Example",
"Feature",
"FeatureList",
"FeatureLists",
"Features",
"FloatList",
"Int64List",
"LooperThread",
示例2: _crop_and_resize_shape
size_value = tensor_util.constant_value(op.inputs[1])
if size_value is not None:
height = size_value[0]
width = size_value[1]
else:
height = None
width = None
return [tensor_shape.TensorShape(
[input_shape[0], height, width, input_shape[3]])]
@ops.RegisterShape('CropAndResize')
def _crop_and_resize_shape(op):
"""Shape function for the CropAndResize op."""
image_shape = op.inputs[0].get_shape().with_rank(4)
box_shape = op.inputs[1].get_shape().with_rank(2)
crop_size = tensor_util.constant_value(op.inputs[3])
if crop_size is not None:
crop_height = crop_size[0]
crop_width = crop_size[1]
else:
crop_height = None
crop_width = None
return [tensor_shape.TensorShape(
[box_shape[0], crop_height, crop_width, image_shape[3]])]
__all__ = make_all(__name__)
# ResizeMethod is not documented, but is documented in functions that use it.
__all__.append('ResizeMethod')
示例3: set
from tensorflow.python.ops import io_ops
from tensorflow.python.ops import math_ops
from tensorflow.python.ops import script_ops
from tensorflow.python.ops import sparse_ops
from tensorflow.python.ops import state_ops
# Don't export modules except for the few we really want
_whitelist = set([app, compat, contrib, errors, flags, gfile, image,
logging, nn, python_io, resource_loader, sysconfig, test,
train, user_ops])
# Export all symbols directly accessible from 'tf.' by drawing on the doc
# strings of other modules.
__all__ = make_all(__name__,
[framework_lib, array_ops, client_lib, constant_op,
control_flow_ops, functional_ops, histogram_ops, io_ops,
math_ops, nn, script_ops, sparse_ops, state_ops, train])
# Symbols whitelisted for export without documentation.
# TODO(cwhipkey): review these and move to contrib, expose through
# documentation, or remove.
__all__.extend([
'AttrValue',
'ClusterDef',
'ClusterSpec',
'ConfigProto',
'Event',
'GPUOptions',
'GRAPH_DEF_VERSION',
'GRAPH_DEF_VERSION_MIN_CONSUMER',
'GRAPH_DEF_VERSION_MIN_PRODUCER',
示例4: TODO
@@summarize_activations
## Utilities
@@assert_same_float_dtype
@@assert_scalar_int
@@is_numeric_tensor
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys
# pylint: disable=unused-import,wildcard-import
from tensorflow.contrib.layers.python.framework.tensor_util import *
from tensorflow.contrib.layers.python.layers import *
from tensorflow.contrib.layers.python.ops import *
from tensorflow.contrib.layers.python.ops import loss_ops
from tensorflow.python.util.all_util import make_all
# Include loss_ops to get the symbols in - but they are not documented in main
# docs yet.
# TODO(cwhipkey): get the loss_ops documented in the main documentation and do
# this in a better way.
__all__ = make_all(__name__, [sys.modules[__name__], loss_ops])
示例5: TODO
# Training data protos.
from tensorflow.core.example.example_pb2 import *
from tensorflow.core.example.feature_pb2 import *
from tensorflow.core.protobuf.saver_pb2 import *
# Utility op. Open Source. TODO(touts): move to nn?
from tensorflow.python.training.learning_rate_decay import exponential_decay
from tensorflow.python.util.all_util import make_all
# Include extra make_all calls because:
# * Input methods in tf.train are documented in io_ops.
# * Saver methods in tf.train are documented in state_ops.
__all__ = list(set(
make_all(__name__) +
make_all(__name__, io_ops.__name__) +
make_all(__name__, state_ops.__name__)))
# Symbols whitelisted for export without documentation.
# TODO(cwhipkey): review these and move to contrib or expose through
# documentation.
__all__.extend([
"BytesList",
"Example",
"Feature",
"FeatureList",
"FeatureLists",
"Features",
"FloatList",
"InferenceExample",
示例6: set
from tensorflow.python.ops import session_ops
from tensorflow.python.ops import sparse_ops
from tensorflow.python.ops import state_ops
from tensorflow.python.ops import string_ops
from tensorflow.python.ops import tensor_array_ops
# Don't export modules except for the few we really want
_whitelist = set([app, compat, contrib, errors, flags, gfile, image, logging,
nn, python_io, resource_loader, sysconfig, test, train,
user_ops])
# Export all symbols directly accessible from 'tf.' by drawing on the doc
# strings of other modules.
__all__ = make_all(__name__, [framework_lib, array_ops, client_lib, check_ops,
constant_op, control_flow_ops, functional_ops,
histogram_ops, io_ops, math_ops, nn, script_ops,
session_ops, sparse_ops, state_ops, string_ops,
summary, tensor_array_ops, train])
# Symbols whitelisted for export without documentation.
# TODO(cwhipkey): review these and move to contrib, expose through
# documentation, or remove.
__all__.extend([
'AttrValue',
'ConfigProto',
'DeviceSpec',
'Event',
'GPUOptions',
'GRAPH_DEF_VERSION',
'GRAPH_DEF_VERSION_MIN_CONSUMER',
'GRAPH_DEF_VERSION_MIN_PRODUCER',
示例7: TODO
of `summarize_collection` to `VARIABLES`, `WEIGHTS` and `BIASES`, respectively.
@@summarize_activations
## Utilities
@@assert_same_float_dtype
@@assert_scalar_int
@@is_numeric_tensor
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
# pylint: disable=unused-import,wildcard-import
from tensorflow.contrib.layers.python.framework.tensor_util import *
from tensorflow.contrib.layers.python.layers import *
from tensorflow.contrib.layers.python.ops import *
from tensorflow.contrib.layers.python.ops import loss_ops
from tensorflow.python.util.all_util import make_all
# Include loss_ops to get the symbols in - but they are not documented in main
# docs yet.
# TODO(cwhipkey): get the loss_ops documented in the main documentation and do
# this in a better way.
__all__ = (make_all(__name__) +
make_all(__name__, loss_ops.__name__))