This page lists some deprecated functions in TensorFlow I have noticed.
THIS FUNCTION IS DEPRECATED. It will be removed after 2017-03-02. Instructions for updating: Use tf.global_variables_initializer
instead.
THIS FUNCTION IS DEPRECATED. It will be removed after 2017-03-02. Instructions for updating: Use tf.local_variables_initializer
instead.
The following deprecated are from this link
- Division and modulus operators (/, //, %) now match Python (flooring) semantics. This applies to
tf.div
andtf.mod
as well. To obtain forced integer truncation based behaviors you can usetf.truncatediv
andtf.truncatemod
. tf.divide()
is now the recommended division function.tf.div()
will remain, but its semantics do not respond to Python 3 orfrom future
mechanisms.- tf.reverse() now takes indices of axes to be reversed. E.g.
tf.reverse(a, [True, False, True])
must now be written astf.reverse(a, [0, 2])
.tf.reverse_v2()
will remain until 1.0 final. tf.mul
,tf.sub
andtf.neg
are deprecated in favor oftf.multiply
,tf.subtract
andtf.negative
.tf.pack
andtf.unpack
are deprecated in favor oftf.stack
andtf.unstack
.TensorArray.pack
andTensorArray.unpack
are getting deprecated in favor ofTensorArray.stack
andTensorArray.unstack
.- The following Python functions have had their arguments changed to use
axis
when referring to specific dimensions. We have kept the old keyword arguments for compatibility currently, but we will be removing them well before the final 1.0.tf.argmax
:dimension
becomesaxis
tf.argmin
:dimension
becomesaxis
tf.count_nonzero
:reduction_indices
becomesaxis
tf.expand_dims
:dim
becomesaxis
tf.reduce_all
:reduction_indices
becomesaxis
tf.reduce_any
:reduction_indices
becomesaxis
tf.reduce_join
:reduction_indices
becomesaxis
tf.reduce_logsumexp
:reduction_indices
becomesaxis
tf.reduce_max
:reduction_indices
becomesaxis
tf.reduce_mean
:reduction_indices
becomesaxis
tf.reduce_min
:reduction_indices
becomesaxis
tf.reduce_prod
:reduction_indices
becomesaxis
tf.reduce_sum
:reduction_indices
becomesaxis
tf.reverse_sequence
:batch_dim
becomesbatch_axis
,seq_dim
becomesseq_axis
tf.sparse_concat
:concat_dim
becomesaxis
tf.sparse_reduce_sum
:reduction_axes
becomesaxis
tf.sparse_reduce_sum_sparse
:reduction_axes
becomesaxis
tf.sparse_split
:split_dim
becomesaxis
tf.listdiff
has been renamed totf.setdiff1d
to match NumPy naming.tf.inv
has been renamed to betf.reciprocal
(component-wise reciprocal) to avoid confusion withnp.inv
which is matrix inversion- tf.round now uses banker’s rounding (round to even) semantics to match NumPy.
tf.split
now takes arguments in a reversed order and with different keywords. In particular, we now match NumPy order astf.split(value, num_or_size_splits, axis)
.tf.sparse_split
now takes arguments in reversed order and with different keywords. In particular we now match NumPy order astf.sparse_split(sp_input, num_split, axis)
. NOTE: we have temporarily madetf.sparse_split
require keyword arguments.- Deprecated
tf.concat
operator. Please switch to usetf.concat_v2
for now. In the Beta release, we will updatetf.concat
to match argument order of `tf.concat_v2. - tf.image.decode_jpeg by default uses the faster DCT method, sacrificing a little fidelity for improved speed. One can revert to the old behavior by specifying the attribute dct_method=’INTEGER_ACCURATE’.
tf.complex_abs
has been removed from the Python interface.tf.abs
supports complex tensors and should be used instead.
- In TensorFlow version 1.0, be sure to switch all the tf.scalar_summary() to tf.summary.scalar(), and tf.merge_all_summaries() to tf.summary.merge_all()