Skip to content

Instantly share code, notes, and snippets.

@johndpope
Created November 2, 2016 21:28
Show Gist options
  • Save johndpope/764e0c82a2d15431c2a19feb25c045a7 to your computer and use it in GitHub Desktop.
Save johndpope/764e0c82a2d15431c2a19feb25c045a7 to your computer and use it in GitHub Desktop.
TensorFlow Python reference documentation
TensorFlow Python reference documentation
Building Graphs:
add_to_collection
as_dtype
bytes
container
control_dependencies
convert_to_tensor
convert_to_tensor_or_indexed_slices
device
DeviceSpec
Dimension
DType
get_collection
get_collection_ref
get_default_graph
get_seed
Graph
GraphKeys
import_graph_def
load_file_system_library
load_op_library
name_scope
NoGradient
op_scope
Operation
register_tensor_conversion_function
RegisterGradient
RegisterShape
reset_default_graph
Tensor
TensorShape
Asserts and boolean checks.:
assert_equal
assert_integer
assert_less
assert_less_equal
assert_negative
assert_non_negative
assert_non_positive
assert_positive
assert_proper_iterable
assert_rank
assert_rank_at_least
assert_type
is_non_decreasing
is_numeric_tensor
is_strictly_increasing
Constants, Sequences, and Random Values:
constant
fill
linspace
multinomial
ones
ones_like
ops
random_crop
random_gamma
random_normal
random_shuffle
random_uniform
range
set_random_seed
truncated_normal
zeros
zeros_like
Variables:
all_variables
assert_variables_initialized
assign
assign_add
assign_sub
constant_initializer
count_up_to
device
export_meta_graph
get_checkpoint_state
get_variable
get_variable_scope
import_meta_graph
IndexedSlices
initialize_all_variables
initialize_local_variables
initialize_variables
is_variable_initialized
latest_checkpoint
local_variables
make_template
min_max_variable_partitioner
moving_average_variables
no_regularizer
ones_initializer
random_normal_initializer
random_uniform_initializer
report_uninitialized_variables
Saver
scatter_add
scatter_sub
scatter_update
sparse_mask
trainable_variables
truncated_normal_initializer
uniform_unit_scaling_initializer
update_checkpoint_state
Variable
variable_axis_size_partitioner
variable_op_scope
variable_scope
VariableScope
zeros_initializer
Tensor Transformations:
batch_to_space
bitcast
boolean_mask
cast
concat
copy
depth_to_space
dynamic_partition
dynamic_stitch
expand_dims
extract_image_patches
gather
gather_nd
meshgrid
one_hot
pack
pad
rank
reshape
reverse
reverse_sequence
saturate_cast
shape
shape_n
size
slice
space_to_batch
space_to_depth
split
squeeze
strided_slice
string_to_number
tile
to_bfloat16
to_double
to_float
to_int32
to_int64
transpose
unique_with_counts
unpack
Math:
abs
accumulate_n
acos
add
add_n
argmax
argmin
asin
atan
batch_cholesky
batch_cholesky_solve
batch_fft
batch_fft2d
batch_fft3d
batch_ifft
batch_ifft2d
batch_ifft3d
batch_matmul
batch_matrix_band_part
batch_matrix_determinant
batch_matrix_diag
batch_matrix_diag_part
batch_matrix_inverse
batch_matrix_set_diag
batch_matrix_solve
batch_matrix_solve_ls
batch_matrix_transpose
batch_matrix_triangular_solve
batch_self_adjoint_eig
batch_self_adjoint_eigvals
batch_svd
ceil
cholesky
cholesky_solve
complex
complex_abs
conj
cos
cross
cumprod
cumsum
diag
diag_part
digamma
div
edit_distance
erf
erfc
exp
fft
fft2d
fft3d
floor
floordiv
ifft
ifft2d
ifft3d
igamma
igammac
imag
inv
invert_permutation
lbeta
lgamma
listdiff
log
matmul
matrix_determinant
matrix_inverse
matrix_solve
matrix_solve_ls
matrix_triangular_solve
maximum
minimum
mod
mul
neg
polygamma
pow
real
reduce_all
reduce_any
reduce_max
reduce_mean
reduce_min
reduce_prod
reduce_sum
round
rsqrt
scalar_mul
segment_max
segment_mean
segment_min
segment_prod
segment_sum
self_adjoint_eig
self_adjoint_eigvals
sign
sin
sparse_segment_mean
sparse_segment_sqrt_n
sparse_segment_sqrt_n_grad
sparse_segment_sum
sqrt
square
squared_difference
sub
svd
tan
trace
transpose
truediv
unique
unsorted_segment_sum
where
zeta
Strings:
as_string
reduce_join
string_join
string_to_hash_bucket
string_to_hash_bucket_fast
string_to_hash_bucket_strong
Histograms:
histogram_fixed_width
Control Flow:
add_check_numerics_ops
Assert
case
check_numerics
cond
count_up_to
equal
greater
greater_equal
group
identity
is_finite
is_inf
is_nan
less
less_equal
logical_and
logical_not
logical_or
logical_xor
no_op
not_equal
Print
select
tuple
verify_tensor_all_finite
where
while_loop
Higher Order Functions:
foldl
foldr
map_fn
scan
TensorArray Operations:
concat
pack
split
TensorArray
unpack
Tensor Handle Operations:
delete_session_tensor
get_session_handle
get_session_tensor
Images:
adjust_brightness
adjust_contrast
adjust_hue
adjust_saturation
central_crop
convert_image_dtype
crop_and_resize
crop_to_bounding_box
decode_jpeg
decode_png
draw_bounding_boxes
encode_jpeg
encode_png
extract_glimpse
flip_left_right
flip_up_down
grayscale_to_rgb
hsv_to_rgb
non_max_suppression
pad_to_bounding_box
per_image_whitening
random_brightness
random_contrast
random_flip_left_right
random_flip_up_down
random_hue
random_saturation
resize_area
resize_bicubic
resize_bilinear
resize_image_with_crop_or_pad
resize_images
resize_nearest_neighbor
rgb_to_grayscale
rgb_to_hsv
rot90
sample_distorted_bounding_box
transpose_image
Sparse Tensors:
shape
sparse_add
sparse_concat
sparse_fill_empty_rows
sparse_maximum
sparse_merge
sparse_minimum
sparse_reduce_sum
sparse_reorder
sparse_reset_shape
sparse_reshape
sparse_retain
sparse_softmax
sparse_split
sparse_tensor_dense_matmul
sparse_tensor_to_dense
sparse_to_dense
sparse_to_indicator
SparseTensor
SparseTensorValue
Inputs and Readers:
batch
batch_join
decode_csv
decode_json_example
decode_raw
FIFOQueue
FixedLenFeature
FixedLengthRecordReader
FixedLenSequenceFeature
IdentityReader
input_producer
limit_epochs
match_filenames_once
matching_files
PaddingFIFOQueue
parse_example
parse_single_example
placeholder
placeholder_with_default
QueueBase
RandomShuffleQueue
range_input_producer
read_file
ReaderBase
shuffle_batch
shuffle_batch_join
size
slice_input_producer
sparse_placeholder
string_input_producer
TextLineReader
TFRecordReader
VarLenFeature
WholeFileReader
Data IO (Python functions):
tf_record_iterator
TFRecordWriter
Neural Network:
atrous_conv2d
avg_pool
avg_pool3d
batch_normalization
bias_add
bidirectional_rnn
compute_accidental_hits
conv2d
conv2d_transpose
conv3d
ctc_beam_search_decoder
ctc_greedy_decoder
ctc_loss
depthwise_conv2d
depthwise_conv2d_native
dilation2d
dropout
dynamic_rnn
elu
embedding_lookup
embedding_lookup_sparse
erosion2d
fixed_unigram_candidate_sampler
in_top_k
l2_loss
l2_normalize
learned_unigram_candidate_sampler
local_response_normalization
log_poisson_loss
log_softmax
log_uniform_candidate_sampler
max_pool
max_pool3d
max_pool_with_argmax
moments
nce_loss
normalize_moments
relu
relu6
rnn
sampled_softmax_loss
separable_conv2d
sigmoid
sigmoid_cross_entropy_with_logits
softmax
softmax_cross_entropy_with_logits
softplus
softsign
sparse_softmax_cross_entropy_with_logits
state_saving_rnn
sufficient_statistics
tanh
top_k
uniform_candidate_sampler
weighted_cross_entropy_with_logits
Neural Network RNN Cells:
BasicLSTMCell
BasicRNNCell
DropoutWrapper
EmbeddingWrapper
GRUCell
InputProjectionWrapper
LSTMCell
LSTMStateTuple
MultiRNNCell
OutputProjectionWrapper
RNNCell
Running Graphs:
AbortedError
AlreadyExistsError
CancelledError
DataLossError
DeadlineExceededError
FailedPreconditionError
get_default_session
InteractiveSession
InternalError
InvalidArgumentError
NotFoundError
OpError
OutOfRangeError
PermissionDeniedError
ResourceExhaustedError
Session
UnauthenticatedError
UnavailableError
UnimplementedError
UnknownError
Training:
AdadeltaOptimizer
AdagradOptimizer
AdamOptimizer
add_queue_runner
AggregationMethod
audio_summary
clip_by_average_norm
clip_by_global_norm
clip_by_norm
clip_by_value
ClusterSpec
Coordinator
do_quantize_training_on_graphdef
exponential_decay
ExponentialMovingAverage
FtrlOptimizer
generate_checkpoint_state_proto
global_norm
global_step
GradientDescentOptimizer
gradients
histogram_summary
image_summary
LooperThread
merge_all_summaries
merge_summary
MomentumOptimizer
Optimizer
QueueRunner
replica_device_setter
RMSPropOptimizer
scalar_summary
Server
SessionManager
start_queue_runners
stop_gradient
summary_iterator
SummaryWriter
Supervisor
write_graph
zero_fraction
Wraps python functions:
py_func
Summary Operations:
tensor_summary
Testing:
assert_equal_graph_def
compute_gradient
compute_gradient_error
get_temp_dir
is_built_with_cuda
main
BayesFlow Stochastic Graph (contrib):
DistributionTensor
get_current_value_type
get_score_function_with_baseline
MeanValue
NoValueTypeSetError
SampleAndReshapeValue
SampleValue
score_function
StochasticTensor
surrogate_loss
value_type
Statistical distributions (contrib):
BaseDistribution
batch_matrix_diag_transform
Bernoulli
Beta
Binomial
Categorical
Chi2
Dirichlet
DirichletMultinomial
Distribution
Exponential
Gamma
InverseGamma
kl
Laplace
Multinomial
MultivariateNormalCholesky
MultivariateNormalDiag
MultivariateNormalDiagPlusVDVT
MultivariateNormalFull
Normal
normal_congugates_known_sigma_predictive
normal_conjugates_known_sigma_posterior
RegisterKL
StudentT
TransformedDistribution
Uniform
FFmpeg (contrib):
decode_audio
encode_audio
Framework (contrib):
add_arg_scope
add_model_variable
arg_scope
arg_scoped_arguments
assert_global_step
assert_or_get_global_step
assert_same_float_dtype
assert_scalar_int
convert_to_tensor_or_sparse_tensor
create_global_step
deprecated
deprecated_arg_values
get_global_step
get_graph_from_inputs
get_local_variables
get_model_variables
get_or_create_global_step
get_unique_variable
get_variables
get_variables_by_name
get_variables_by_suffix
get_variables_to_restore
has_arg_scope
is_non_decreasing
is_numeric_tensor
is_strictly_increasing
is_tensor
local_variable
model_variable
reduce_sum_n
safe_embedding_lookup_sparse
variable
VariableDeviceChooser
with_same_shape
with_shape
Graph Editor (contrib):
bypass
connect
detach
detach_inputs
detach_outputs
matcher
ph
reroute_a2b
reroute_a2b_inputs
reroute_a2b_outputs
reroute_b2a
reroute_b2a_inputs
reroute_b2a_outputs
select_ops
select_ts
sgv
sgv_scope
SubGraphView
swap
swap_inputs
swap_outputs
Transformer
ts
Layers (contrib):
apply_regularization
avg_pool2d
batch_norm
convolution2d
convolution2d_in_plane
convolution2d_transpose
flatten
fully_connected
l1_regularizer
l2_regularizer
max_pool2d
one_hot_encoding
optimize_loss
repeat
separable_convolution2d
stack
sum_regularizer
summarize_activation
summarize_activations
summarize_collection
summarize_tensor
summarize_tensors
unit_norm
variance_scaling_initializer
xavier_initializer
xavier_initializer_conv2d
Learn (contrib):
BaseEstimator
DNNClassifier
DNNRegressor
Estimator
evaluate
extract_dask_data
extract_dask_labels
extract_pandas_data
extract_pandas_labels
extract_pandas_matrix
infer
LinearClassifier
LinearRegressor
ModeKeys
NanLossDuringTrainingError
read_batch_examples
read_batch_features
read_batch_record_features
run_feeds
run_n
RunConfig
TensorFlowClassifier
TensorFlowDNNClassifier
TensorFlowDNNRegressor
TensorFlowEstimator
TensorFlowLinearClassifier
TensorFlowLinearRegressor
TensorFlowRegressor
TensorFlowRNNClassifier
TensorFlowRNNRegressor
train
Monitors (contrib):
BaseMonitor
CaptureVariable
CheckpointSaver
EveryN
ExportMonitor
get_default_monitors
GraphDump
LoggingTrainable
NanLoss
PrintTensor
StepCounter
StopAtStep
SummarySaver
SummaryWriterCache
ValidationMonitor
Losses (contrib):
absolute_difference
add_loss
cosine_distance
get_losses
get_regularization_losses
get_total_loss
hinge_loss
log_loss
sigmoid_cross_entropy
softmax_cross_entropy
sum_of_pairwise_squares
sum_of_squares
RNN (contrib):
AttentionCellWrapper
CoupledInputForgetGateLSTMCell
GridLSTMCell
LSTMFusedCell
TimeFreqLSTMCell
Metrics (contrib):
accuracy
aggregate_metric_map
aggregate_metrics
auc_using_histogram
confusion_matrix
set_difference
set_intersection
set_size
set_union
streaming_accuracy
streaming_auc
streaming_mean
streaming_mean_absolute_error
streaming_mean_cosine_distance
streaming_mean_iou
streaming_mean_relative_error
streaming_mean_squared_error
streaming_percentage_less
streaming_precision
streaming_recall
streaming_recall_at_k
streaming_root_mean_squared_error
streaming_sparse_precision_at_k
streaming_sparse_recall_at_k
Utilities (contrib):
constant_value
make_ndarray
make_tensor_proto
ops_used_by_graph_def
stripped_op_list_for_graph
Copying Graph Elements (contrib):
copy_op_to_graph
copy_variable_to_graph
get_copied_op
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment