Type training
Namespace tensorflow.contrib.training
Methods
- add_gradients_summaries
- add_gradients_summaries_dyn
- batch_sequences_with_states
- batch_sequences_with_states
- batch_sequences_with_states_dyn
- bucket
- bucket
- bucket
- bucket
- bucket
- bucket
- bucket
- bucket
- bucket
- bucket
- bucket
- bucket
- bucket
- bucket
- bucket
- bucket
- bucket
- bucket
- bucket
- bucket
- bucket
- bucket
- bucket
- bucket
- bucket_by_sequence_length
- bucket_by_sequence_length_dyn
- bucket_dyn
- byte_size_load_fn
- byte_size_load_fn_dyn
- checkpoints_iterator
- checkpoints_iterator
- checkpoints_iterator_dyn
- clip_gradient_norms
- clip_gradient_norms_dyn
- clip_gradient_norms_fn
- clip_gradient_norms_fn_dyn
- create_train_op
- create_train_op_dyn
- evaluate_repeatedly
- evaluate_repeatedly
- evaluate_repeatedly
- evaluate_repeatedly
- evaluate_repeatedly
- evaluate_repeatedly
- evaluate_repeatedly_dyn
- multiply_gradients
- multiply_gradients_dyn
- parse_values
- parse_values
- parse_values_dyn
- rejection_sample
- rejection_sample_dyn
- resample_at_rate
- resample_at_rate
- resample_at_rate
- resample_at_rate
- resample_at_rate
- resample_at_rate
- resample_at_rate
- resample_at_rate
- resample_at_rate_dyn
- stratified_sample
- stratified_sample
- stratified_sample
- stratified_sample
- stratified_sample
- stratified_sample
- stratified_sample
- stratified_sample
- stratified_sample
- stratified_sample
- stratified_sample
- stratified_sample
- stratified_sample
- stratified_sample
- stratified_sample
- stratified_sample
- stratified_sample
- stratified_sample
- stratified_sample
- stratified_sample
- stratified_sample
- stratified_sample
- stratified_sample
- stratified_sample
- stratified_sample_dyn
- train
- train_dyn
- wait_for_new_checkpoint
- wait_for_new_checkpoint
- wait_for_new_checkpoint
- wait_for_new_checkpoint
- wait_for_new_checkpoint_dyn
- weighted_resample
- weighted_resample
- weighted_resample
- weighted_resample
- weighted_resample
- weighted_resample
- weighted_resample
- weighted_resample
- weighted_resample
- weighted_resample
- weighted_resample
- weighted_resample
- weighted_resample
- weighted_resample
- weighted_resample
- weighted_resample
- weighted_resample_dyn
Properties
- _SequenceInputWrapper_fn
- add_gradients_summaries_fn
- batch_sequences_with_states_fn
- bucket_by_sequence_length_fn
- bucket_fn
- byte_size_load_fn_fn
- checkpoints_iterator_fn
- clip_gradient_norms_fn_
- clip_gradient_norms_fn_fn
- create_train_op_fn
- evaluate_repeatedly_fn
- GreedyLoadBalancingStrategy_fn
- HParams_fn
- multiply_gradients_fn
- NextQueuedSequenceBatch_fn
- PARAM_RE
- PARAM_RE_dyn
- parse_values_fn
- RandomStrategy_fn
- rejection_sample_fn
- resample_at_rate_fn
- SequenceQueueingStateSaver_fn
- stratified_sample_fn
- train_fn
- wait_for_new_checkpoint_fn
- weighted_resample_fn
Public static methods
IList<Tensor> add_gradients_summaries(IEnumerable<object> grads_and_vars)
object add_gradients_summaries_dyn(object grads_and_vars)
NextQueuedSequenceBatch batch_sequences_with_states(IGraphNodeBase input_key, IDictionary<string, object> input_sequences, IDictionary<string, IEnumerable<int>> input_context, Nullable<int> input_length, IDictionary<string, object> initial_states, int num_unroll, int batch_size, int num_threads, int capacity, bool allow_small_batch, bool pad, bool make_keys_unique, Nullable<int> make_keys_unique_seed, string name)
NextQueuedSequenceBatch batch_sequences_with_states(string input_key, IDictionary<string, object> input_sequences, IDictionary<string, IEnumerable<int>> input_context, Nullable<int> input_length, IDictionary<string, object> initial_states, int num_unroll, int batch_size, int num_threads, int capacity, bool allow_small_batch, bool pad, bool make_keys_unique, Nullable<int> make_keys_unique_seed, string name)
object batch_sequences_with_states_dyn(object input_key, object input_sequences, object input_context, object input_length, object initial_states, object num_unroll, object batch_size, ImplicitContainer<T> num_threads, ImplicitContainer<T> capacity, ImplicitContainer<T> allow_small_batch, ImplicitContainer<T> pad, ImplicitContainer<T> make_keys_unique, object make_keys_unique_seed, object name)
ValueTuple<object, object> bucket(IEnumerable<SparseTensor> tensors, IGraphNodeBase which_bucket, int batch_size, int num_buckets, int num_threads, int capacity, IEnumerable<int> bucket_capacities, IEnumerable<object> shapes, bool dynamic_pad, bool allow_smaller_final_batch, IGraphNodeBase keep_input, object shared_name, string name)
ValueTuple<object, object> bucket(IEnumerable<SparseTensor> tensors, IGraphNodeBase which_bucket, int batch_size, int num_buckets, int num_threads, int capacity, IEnumerable<int> bucket_capacities, IEnumerable<object> shapes, bool dynamic_pad, bool allow_smaller_final_batch, bool keep_input, object shared_name, string name)
ValueTuple<object, object> bucket(IEnumerable<SparseTensor> tensors, IGraphNodeBase which_bucket, ValueTuple<IEnumerable<object>, object> batch_size, int num_buckets, int num_threads, int capacity, IEnumerable<int> bucket_capacities, IEnumerable<object> shapes, bool dynamic_pad, bool allow_smaller_final_batch, IGraphNodeBase keep_input, object shared_name, string name)
ValueTuple<object, object> bucket(IEnumerable<SparseTensor> tensors, IGraphNodeBase which_bucket, ValueTuple<IEnumerable<object>, object> batch_size, int num_buckets, int num_threads, int capacity, IEnumerable<int> bucket_capacities, IEnumerable<object> shapes, bool dynamic_pad, bool allow_smaller_final_batch, bool keep_input, object shared_name, string name)
ValueTuple<object, object> bucket(IEnumerable<SparseTensor> tensors, IGraphNodeBase which_bucket, IEnumerable<int> batch_size, int num_buckets, int num_threads, int capacity, IEnumerable<int> bucket_capacities, IEnumerable<object> shapes, bool dynamic_pad, bool allow_smaller_final_batch, IGraphNodeBase keep_input, object shared_name, string name)
ValueTuple<object, object> bucket(IEnumerable<SparseTensor> tensors, IGraphNodeBase which_bucket, IEnumerable<int> batch_size, int num_buckets, int num_threads, int capacity, IEnumerable<int> bucket_capacities, IEnumerable<object> shapes, bool dynamic_pad, bool allow_smaller_final_batch, bool keep_input, object shared_name, string name)
ValueTuple<object, object> bucket(IEnumerable<SparseTensor> tensors, IndexedSlices which_bucket, int batch_size, int num_buckets, int num_threads, int capacity, IEnumerable<int> bucket_capacities, IEnumerable<object> shapes, bool dynamic_pad, bool allow_smaller_final_batch, IGraphNodeBase keep_input, object shared_name, string name)
ValueTuple<object, object> bucket(IEnumerable<SparseTensor> tensors, IndexedSlices which_bucket, int batch_size, int num_buckets, int num_threads, int capacity, IEnumerable<int> bucket_capacities, IEnumerable<object> shapes, bool dynamic_pad, bool allow_smaller_final_batch, bool keep_input, object shared_name, string name)
ValueTuple<object, object> bucket(IEnumerable<SparseTensor> tensors, IndexedSlices which_bucket, ValueTuple<IEnumerable<object>, object> batch_size, int num_buckets, int num_threads, int capacity, IEnumerable<int> bucket_capacities, IEnumerable<object> shapes, bool dynamic_pad, bool allow_smaller_final_batch, IGraphNodeBase keep_input, object shared_name, string name)
ValueTuple<object, object> bucket(IEnumerable<SparseTensor> tensors, IndexedSlices which_bucket, ValueTuple<IEnumerable<object>, object> batch_size, int num_buckets, int num_threads, int capacity, IEnumerable<int> bucket_capacities, IEnumerable<object> shapes, bool dynamic_pad, bool allow_smaller_final_batch, bool keep_input, object shared_name, string name)
ValueTuple<object, object> bucket(IEnumerable<SparseTensor> tensors, IndexedSlices which_bucket, IEnumerable<int> batch_size, int num_buckets, int num_threads, int capacity, IEnumerable<int> bucket_capacities, IEnumerable<object> shapes, bool dynamic_pad, bool allow_smaller_final_batch, IGraphNodeBase keep_input, object shared_name, string name)
ValueTuple<object, object> bucket(IEnumerable<SparseTensor> tensors, ValueTuple<IEnumerable<object>, object> which_bucket, IEnumerable<int> batch_size, int num_buckets, int num_threads, int capacity, IEnumerable<int> bucket_capacities, IEnumerable<object> shapes, bool dynamic_pad, bool allow_smaller_final_batch, IGraphNodeBase keep_input, object shared_name, string name)
ValueTuple<object, object> bucket(IEnumerable<SparseTensor> tensors, ValueTuple<IEnumerable<object>, object> which_bucket, int batch_size, int num_buckets, int num_threads, int capacity, IEnumerable<int> bucket_capacities, IEnumerable<object> shapes, bool dynamic_pad, bool allow_smaller_final_batch, IGraphNodeBase keep_input, object shared_name, string name)
ValueTuple<object, object> bucket(IEnumerable<SparseTensor> tensors, ValueTuple<IEnumerable<object>, object> which_bucket, int batch_size, int num_buckets, int num_threads, int capacity, IEnumerable<int> bucket_capacities, IEnumerable<object> shapes, bool dynamic_pad, bool allow_smaller_final_batch, bool keep_input, object shared_name, string name)
ValueTuple<object, object> bucket(IEnumerable<SparseTensor> tensors, ValueTuple<IEnumerable<object>, object> which_bucket, ValueTuple<IEnumerable<object>, object> batch_size, int num_buckets, int num_threads, int capacity, IEnumerable<int> bucket_capacities, IEnumerable<object> shapes, bool dynamic_pad, bool allow_smaller_final_batch, IGraphNodeBase keep_input, object shared_name, string name)
ValueTuple<object, object> bucket(IEnumerable<SparseTensor> tensors, ValueTuple<IEnumerable<object>, object> which_bucket, ValueTuple<IEnumerable<object>, object> batch_size, int num_buckets, int num_threads, int capacity, IEnumerable<int> bucket_capacities, IEnumerable<object> shapes, bool dynamic_pad, bool allow_smaller_final_batch, bool keep_input, object shared_name, string name)
ValueTuple<object, object> bucket(IEnumerable<SparseTensor> tensors, ValueTuple<IEnumerable<object>, object> which_bucket, IEnumerable<int> batch_size, int num_buckets, int num_threads, int capacity, IEnumerable<int> bucket_capacities, IEnumerable<object> shapes, bool dynamic_pad, bool allow_smaller_final_batch, bool keep_input, object shared_name, string name)
ValueTuple<object, object> bucket(IEnumerable<SparseTensor> tensors, IEnumerable<object> which_bucket, int batch_size, int num_buckets, int num_threads, int capacity, IEnumerable<int> bucket_capacities, IEnumerable<object> shapes, bool dynamic_pad, bool allow_smaller_final_batch, IGraphNodeBase keep_input, object shared_name, string name)
ValueTuple<object, object> bucket(IEnumerable<SparseTensor> tensors, IndexedSlices which_bucket, IEnumerable<int> batch_size, int num_buckets, int num_threads, int capacity, IEnumerable<int> bucket_capacities, IEnumerable<object> shapes, bool dynamic_pad, bool allow_smaller_final_batch, bool keep_input, object shared_name, string name)
ValueTuple<object, object> bucket(IEnumerable<SparseTensor> tensors, IEnumerable<object> which_bucket, ValueTuple<IEnumerable<object>, object> batch_size, int num_buckets, int num_threads, int capacity, IEnumerable<int> bucket_capacities, IEnumerable<object> shapes, bool dynamic_pad, bool allow_smaller_final_batch, IGraphNodeBase keep_input, object shared_name, string name)
ValueTuple<object, object> bucket(IEnumerable<SparseTensor> tensors, IEnumerable<object> which_bucket, ValueTuple<IEnumerable<object>, object> batch_size, int num_buckets, int num_threads, int capacity, IEnumerable<int> bucket_capacities, IEnumerable<object> shapes, bool dynamic_pad, bool allow_smaller_final_batch, bool keep_input, object shared_name, string name)
ValueTuple<object, object> bucket(IEnumerable<SparseTensor> tensors, IEnumerable<object> which_bucket, IEnumerable<int> batch_size, int num_buckets, int num_threads, int capacity, IEnumerable<int> bucket_capacities, IEnumerable<object> shapes, bool dynamic_pad, bool allow_smaller_final_batch, IGraphNodeBase keep_input, object shared_name, string name)
ValueTuple<object, object> bucket(IEnumerable<SparseTensor> tensors, IEnumerable<object> which_bucket, IEnumerable<int> batch_size, int num_buckets, int num_threads, int capacity, IEnumerable<int> bucket_capacities, IEnumerable<object> shapes, bool dynamic_pad, bool allow_smaller_final_batch, bool keep_input, object shared_name, string name)
ValueTuple<object, object> bucket(IEnumerable<SparseTensor> tensors, IEnumerable<object> which_bucket, int batch_size, int num_buckets, int num_threads, int capacity, IEnumerable<int> bucket_capacities, IEnumerable<object> shapes, bool dynamic_pad, bool allow_smaller_final_batch, bool keep_input, object shared_name, string name)
ValueTuple<object, object> bucket_by_sequence_length(object input_length, IEnumerable<object> tensors, int batch_size, IEnumerable<int> bucket_boundaries, int num_threads, int capacity, IEnumerable<int> bucket_capacities, object shapes, bool dynamic_pad, bool allow_smaller_final_batch, bool keep_input, object shared_name, string name)
object bucket_by_sequence_length_dyn(object input_length, object tensors, object batch_size, object bucket_boundaries, ImplicitContainer<T> num_threads, ImplicitContainer<T> capacity, object bucket_capacities, object shapes, ImplicitContainer<T> dynamic_pad, ImplicitContainer<T> allow_smaller_final_batch, ImplicitContainer<T> keep_input, object shared_name, object name)
object bucket_dyn(object tensors, object which_bucket, object batch_size, object num_buckets, ImplicitContainer<T> num_threads, ImplicitContainer<T> capacity, object bucket_capacities, object shapes, ImplicitContainer<T> dynamic_pad, ImplicitContainer<T> allow_smaller_final_batch, ImplicitContainer<T> keep_input, object shared_name, object name)
PythonFunctionContainer byte_size_load_fn(object op)
object byte_size_load_fn_dyn(object op)
IEnumerator<object> checkpoints_iterator(string checkpoint_dir, int min_interval_secs, Nullable<double> timeout, PythonFunctionContainer timeout_fn)
Continuously yield new checkpoint files as they appear. The iterator only checks for new checkpoints when control flow has been
reverted to it. This means it can miss checkpoints if your code takes longer
to run between iterations than `min_interval_secs` or the interval at which
new checkpoints are written. The `timeout` argument is the maximum number of seconds to block waiting for
a new checkpoint. It is used in combination with the `timeout_fn` as
follows: * If the timeout expires and no `timeout_fn` was specified, the iterator
stops yielding.
* If a `timeout_fn` was specified, that function is called and if it returns
a true boolean value the iterator stops yielding.
* If the function returns a false boolean value then the iterator resumes the
wait for new checkpoints. At this point the timeout logic applies again. This behavior gives control to callers on what to do if checkpoints do not
come fast enough or stop being generated. For example, if callers have a way
to detect that the training has stopped and know that no new checkpoints
will be generated, they can provide a `timeout_fn` that returns `True` when
the training has stopped. If they know that the training is still going on
they return `False` instead.
Parameters
-
string
checkpoint_dir - The directory in which checkpoints are saved.
-
int
min_interval_secs - The minimum number of seconds between yielding checkpoints.
-
Nullable<double>
timeout - The maximum number of seconds to wait between checkpoints. If left as `None`, then the process will wait indefinitely.
-
PythonFunctionContainer
timeout_fn - Optional function to call after a timeout. If the function returns True, then it means that no new checkpoints will be generated and the iterator will exit. The function is called with no arguments.
IEnumerator<object> checkpoints_iterator(string checkpoint_dir, int min_interval_secs, int timeout, PythonFunctionContainer timeout_fn)
object checkpoints_iterator_dyn(object checkpoint_dir, ImplicitContainer<T> min_interval_secs, object timeout, object timeout_fn)
Continuously yield new checkpoint files as they appear. The iterator only checks for new checkpoints when control flow has been
reverted to it. This means it can miss checkpoints if your code takes longer
to run between iterations than `min_interval_secs` or the interval at which
new checkpoints are written. The `timeout` argument is the maximum number of seconds to block waiting for
a new checkpoint. It is used in combination with the `timeout_fn` as
follows: * If the timeout expires and no `timeout_fn` was specified, the iterator
stops yielding.
* If a `timeout_fn` was specified, that function is called and if it returns
a true boolean value the iterator stops yielding.
* If the function returns a false boolean value then the iterator resumes the
wait for new checkpoints. At this point the timeout logic applies again. This behavior gives control to callers on what to do if checkpoints do not
come fast enough or stop being generated. For example, if callers have a way
to detect that the training has stopped and know that no new checkpoints
will be generated, they can provide a `timeout_fn` that returns `True` when
the training has stopped. If they know that the training is still going on
they return `False` instead.
Parameters
-
object
checkpoint_dir - The directory in which checkpoints are saved.
-
ImplicitContainer<T>
min_interval_secs - The minimum number of seconds between yielding checkpoints.
-
object
timeout - The maximum number of seconds to wait between checkpoints. If left as `None`, then the process will wait indefinitely.
-
object
timeout_fn - Optional function to call after a timeout. If the function returns True, then it means that no new checkpoints will be generated and the iterator will exit. The function is called with no arguments.