http://www.tensorfly.cn/tfdoc/api_docs/python/nn.html
tf.nn.relu(features, name=None)
tf.nn.relu6(features, name=None)
tf.nn.softplus(features, name=None)
tf.nn.dropout(x, keep_prob, noise_shape=None, seed=None, name=None)
tf.nn.bias_add(value, bias, name=None)
tf.sigmoid(x, name=None)
tf.tanh(x, name=None)
tf.nn.conv2d(input, filter, strides, padding, use_cudnn_on_gpu=None, name=None)
tf.nn.depthwise_conv2d(input, filter, strides, padding, name=None)
tf.nn.separable_conv2d(input, depthwise_filter, pointwise_filter, strides, padding, name=None)
tf.nn.avg_pool(value, ksize, strides, padding, name=None)
tf.nn.max_pool(value, ksize, strides, padding, name=None)
tf.nn.max_pool_with_argmax(input, ksize, strides, padding, Targmax=None, name=None)
tf.nn.l2_normalize(x, dim, epsilon=1e-12, name=None)
tf.nn.local_response_normalization(input, depth_radius=None, bias=None, alpha=None, beta=None, name=None)
tf.nn.moments(x, axes, name=None)
tf.nn.l2_loss(t, name=None)
tf.nn.sigmoid_cross_entropy_with_logits(logits, targets, name=None)
tf.nn.softmax(logits, name=None)
tf.nn.softmax_cross_entropy_with_logits(logits, labels, name=None)
tf.nn.embedding_lookup(params, ids, name=None)
tf.nn.top_k(input, k, name=None)
tf.nn.in_top_k(predictions, targets, k, name=None)
tf.nn.nce_loss(weights, biases, inputs, labels, num_sampled, num_classes, num_true=1, sampled_values=None, remove_accidental_hits=False, name='nce_loss')
tf.nn.sampled_softmax_loss(weights, biases, inputs, labels, num_sampled, num_classes, num_true=1, sampled_values=None, remove_accidental_hits=True, name='sampled_softmax_loss')
tf.nn.uniform_candidate_sampler(true_classes, num_true, num_sampled, unique, range_max, seed=None, name=None)
tf.nn.log_uniform_candidate_sampler(true_classes, num_true, num_sampled, unique, range_max, seed=None, name=None)
tf.nn.learned_unigram_candidate_sampler(true_classes, num_true, num_sampled, unique, range_max, seed=None, name=None)
tf.nn.fixed_unigram_candidate_sampler(true_classes, num_true, num_sampled, unique, range_max, vocab_file='', distortion=0.0, num_reserved_ids=0, num_shards=1, shard=0, unigrams=[], seed=None, name=None)
tf.nn.compute_accidental_hits(true_classes, sampled_candidates, num_true, seed=None, name=None)
tf.add(x, y, name=None)
tf.sub(x, y, name=None)
tf.mul(x, y, name=None)
tf.div(x, y, name=None)
tf.mod(x, y, name=None)
tf.add_n(inputs, name=None)
tf.abs(x, name=None)
tf.neg(x, name=None)
tf.sign(x, name=None)
tf.inv(x, name=None)
tf.square(x, name=None)
tf.round(x, name=None)
tf.sqrt(x, name=None)
tf.rsqrt(x, name=None)
tf.pow(x, y, name=None)
tf.exp(x, name=None)
tf.log(x, name=None)
tf.ceil(x, name=None)
tf.floor(x, name=None)
tf.maximum(x, y, name=None)
tf.minimum(x, y, name=None)
tf.cos(x, name=None)
tf.sin(x, name=None)
tf.diag(diagonal, name=None)
tf.transpose(a, perm=None, name='transpose')
tf.matmul(a, b, transpose_a=False, transpose_b=False, a_is_sparse=False, b_is_sparse=False, name=None)
tf.batch_matmul(x, y, adj_x=None, adj_y=None, name=None)
tf.matrix_determinant(input, name=None)
tf.batch_matrix_determinant(input, name=None)
tf.matrix_inverse(input, name=None)
tf.batch_matrix_inverse(input, name=None)
tf.cholesky(input, name=None)
tf.batch_cholesky(input, name=None)
tf.complex(real, imag, name=None)
tf.complex_abs(x, name=None)
tf.conj(in_, name=None)
tf.imag(in_, name=None)
tf.real(in_, name=None)
tf.reduce_sum(input_tensor, reduction_indices=None, keep_dims=False, name=None)
tf.reduce_prod(input_tensor, reduction_indices=None, keep_dims=False, name=None)
tf.reduce_min(input_tensor, reduction_indices=None, keep_dims=False, name=None)
tf.reduce_max(input_tensor, reduction_indices=None, keep_dims=False, name=None)
tf.reduce_mean(input_tensor, reduction_indices=None, keep_dims=False, name=None)
tf.reduce_all(input_tensor, reduction_indices=None, keep_dims=False, name=None)
tf.reduce_any(input_tensor, reduction_indices=None, keep_dims=False, name=None)
tf.accumulate_n(inputs, shape=None, tensor_dtype=None, name=None)
tf.segment_sum(data, segment_ids, name=None)
tf.segment_prod(data, segment_ids, name=None)
tf.segment_min(data, segment_ids, name=None)
tf.segment_max(data, segment_ids, name=None)
tf.segment_mean(data, segment_ids, name=None)
tf.unsorted_segment_sum(data, segment_ids, num_segments, name=None)
tf.sparse_segment_sum(data, indices, segment_ids, name=None)
tf.sparse_segment_mean(data, indices, segment_ids, name=None)
tf.argmin(input, dimension, name=None)
tf.argmax(input, dimension, name=None)
tf.listdiff(x, y, name=None)
tf.where(input, name=None)
tf.unique(x, name=None)
tf.edit_distance(hypothesis, truth, normalize=True, name='edit_distance')
tf.invert_permutation(x, name=None)
class tf.train.Optimizer
Usage
Processing gradients before applying them.
Gating Gradients
Slots
class tf.train.GradientDescentOptimizer
class tf.train.AdagradOptimizer
class tf.train.MomentumOptimizer
class tf.train.AdamOptimizer
class tf.train.FtrlOptimizer
class tf.train.RMSPropOptimizer
tf.gradients(ys, xs, grad_ys=None, name='gradients', colocate_gradients_with_ops=False, gate_gradients=False, aggregation_method=None)
class tf.AggregationMethod
tf.stop_gradient(input, name=None)
tf.clip_by_value(t, clip_value_min, clip_value_max, name=None)
tf.clip_by_norm(t, clip_norm, name=None)
tf.clip_by_average_norm(t, clip_norm, name=None)
tf.clip_by_global_norm(t_list, clip_norm, use_norm=None, name=None)
tf.global_norm(t_list, name=None)
tf.train.exponential_decay(learning_rate, global_step, decay_steps, decay_rate, staircase=False, name=None)
class tf.train.ExponentialMovingAverage
class tf.train.Coordinator
class tf.train.QueueRunner
tf.train.add_queue_runner(qr, collection='queue_runners')
tf.train.start_queue_runners(sess=None, coord=None, daemon=True, start=True, collection='queue_runners')
tf.scalar_summary(tags, values, collections=None, name=None)
tf.image_summary(tag, tensor, max_images=None, collections=None, name=None)
tf.histogram_summary(tag, values, collections=None, name=None)
tf.nn.zero_fraction(value, name=None)
tf.merge_summary(inputs, collections=None, name=None)
tf.merge_all_summaries(key='summaries')
class tf.train.SummaryWriter
tf.train.summary_iterator(path)
tf.train.global_step(sess, global_step_tensor)
tf.train.write_graph(graph_def, logdir, name, as_text=True)
tensorflow::Tensor
tensorflow::Tensor::Tensor()
tensorflow::Tensor::Tensor(DataType type, const TensorShape &shape)
type
and shape
.tensorflow::Tensor::Tensor(Allocator *a, DataType type, const TensorShape &shape)
type
and shape
, using the allocator a
to allocate the underlying buffer.tensorflow::Tensor::Tensor(DataType type)
tensorflow::Tensor::Tensor(const Tensor &other)
tensorflow::Tensor::~Tensor()
DataType tensorflow::Tensor::dtype() const
const TensorShape& tensorflow::Tensor::shape() const
int tensorflow::Tensor::dims() const
int64 tensorflow::Tensor::dim_size(int d) const
int64 tensorflow::Tensor::NumElements() const
bool tensorflow::Tensor::IsSameSize(const Tensor &b) const
bool tensorflow::Tensor::IsInitialized() const
size_t tensorflow::Tensor::TotalBytes() const
Tensor& tensorflow::Tensor::operator=(const Tensor &other)
bool tensorflow::Tensor::CopyFrom(const Tensor &other, const TensorShape &shape) TF_MUST_USE_RESULT
Tensor tensorflow::Tensor::Slice(int64 dim0_start, int64 dim0_limit) const
bool tensorflow::Tensor::FromProto(const TensorProto &other) TF_MUST_USE_RESULT
other
and construct the tensor.bool tensorflow::Tensor::FromProto(Allocator *a, const TensorProto &other) TF_MUST_USE_RESULT
void tensorflow::Tensor::AsProtoField(TensorProto *proto) const
proto
with *this
tensor’s content.void tensorflow::Tensor::AsProtoTensorContent(TensorProto *proto) const
TTypes::Vec tensorflow::Tensor::vec()
Eigen::Tensor
with the type and sizes of this Tensor
.TTypes::Matrix tensorflow::Tensor::matrix()
TTypes< T, NDIMS >::Tensor tensorflow::Tensor::tensor()
TTypes::Flat tensorflow::Tensor::flat()
Eigen::Tensor
of the data type and a specified shape.TTypes::UnalignedFlat tensorflow::Tensor::unaligned_flat()
TTypes::Matrix tensorflow::Tensor::flat_inner_dims()
TTypes::Matrix tensorflow::Tensor::flat_outer_dims()
TTypes< T, NDIMS >::Tensor tensorflow::Tensor::shaped(gtl::ArraySlice< int64 > new_sizes)
TTypes< T, NDIMS >::UnalignedTensor tensorflow::Tensor::unaligned_shaped(gtl::ArraySlice< int64 > new_sizes)
TTypes< T >::Scalar tensorflow::Tensor::scalar()
TensorMap
of fixed size 1: TensorMap>
.TTypes::ConstVec tensorflow::Tensor::vec() const
TTypes::ConstMatrix tensorflow::Tensor::matrix() const
TTypes< T, NDIMS >::ConstTensor tensorflow::Tensor::tensor() const
TTypes::ConstFlat tensorflow::Tensor::flat() const
TTypes::UnalignedConstFlat tensorflow::Tensor::unaligned_flat() const
TTypes::ConstMatrix tensorflow::Tensor::flat_inner_dims() const
TTypes::ConstMatrix tensorflow::Tensor::flat_outer_dims() const
TTypes< T, NDIMS >::ConstTensor tensorflow::Tensor::shaped(gtl::ArraySlice< int64 > new_sizes) const
TTypes< T, NDIMS >::UnalignedConstTensor tensorflow::Tensor::unaligned_shaped(gtl::ArraySlice< int64 > new_sizes) const
TTypes< T >::ConstScalar tensorflow::Tensor::scalar() const
string tensorflow::Tensor::SummarizeValue(int64 max_entries) const
max_entries
values in *this
into a string.string tensorflow::Tensor::DebugString() const
void tensorflow::Tensor::FillDescription(TensorDescription *description) const
StringPiece tensorflow::Tensor::tensor_data() const
StringPiece
mapping the current tensor’s buffer.tf.zeros(shape, dtype=tf.float32, name=None)
tf.zeros_like(tensor, dtype=None, name=None)
tf.ones(shape, dtype=tf.float32, name=None)
tf.ones_like(tensor, dtype=None, name=None)
tf.fill(dims, value, name=None)
tf.constant(value, dtype=None, shape=None, name='Const')
tf.linspace(start, stop, num, name=None)
tf.range(start, limit, delta=1, name='range')
tf.random_normal(shape, mean=0.0, stddev=1.0, dtype=tf.float32, seed=None, name=None)
tf.truncated_normal(shape, mean=0.0, stddev=1.0, dtype=tf.float32, seed=None, name=None)
tf.random_uniform(shape, minval=0.0, maxval=1.0, dtype=tf.float32, seed=None, name=None)
tf.random_shuffle(value, seed=None, name=None)
tf.set_random_seed(seed)