tensorcv.callbacks.base.
Callback
[source]¶Bases: object
base class for callbacks
epochs_completed
¶global_step
¶tensorcv.callbacks.debug.
CheckScalar
(tensors, periodic=1)[source]¶Bases: tensorcv.callbacks.base.Callback
print scalar tensor values during training .. attribute:: _tensors
_names
¶tensorcv.callbacks.group.
Callbacks
(cbs)[source]¶Bases: tensorcv.callbacks.base.Callback
group all the callback
tensorcv.callbacks.hooks.
Callback2Hook
(cb)[source]¶Bases: tensorflow.python.training.session_run_hook.SessionRunHook
after_run
(rct, val)[source]¶Called after each call to run().
The run_values argument contains results of requested ops/tensors by before_run().
The run_context argument is the same one send to before_run call. run_context.request_stop() can be called to stop the iteration.
If session.run() raises any exceptions then after_run() is not called.
Parameters: |
|
---|
before_run
(rct)[source]¶Called before each call to run().
You can return from this call a SessionRunArgs object indicating ops or tensors to add to the upcoming run() call. These ops/tensors will be run together with the ops/tensors originally passed to the original run() call. The run args you return can also contain feeds to be added to the run() call.
The run_context argument is a SessionRunContext that provides information about the upcoming run() call: the originally requested op/tensors, the TensorFlow Session.
At this point graph is finalized and you can not add ops.
Parameters: | run_context – A SessionRunContext object. |
---|---|
Returns: | None or a SessionRunArgs object. |
tensorcv.callbacks.hooks.
Infer2Hook
(inferencer)[source]¶Bases: tensorflow.python.training.session_run_hook.SessionRunHook
after_run
(rct, val)[source]¶Called after each call to run().
The run_values argument contains results of requested ops/tensors by before_run().
The run_context argument is the same one send to before_run call. run_context.request_stop() can be called to stop the iteration.
If session.run() raises any exceptions then after_run() is not called.
Parameters: |
|
---|
before_run
(rct)[source]¶Called before each call to run().
You can return from this call a SessionRunArgs object indicating ops or tensors to add to the upcoming run() call. These ops/tensors will be run together with the ops/tensors originally passed to the original run() call. The run args you return can also contain feeds to be added to the run() call.
The run_context argument is a SessionRunContext that provides information about the upcoming run() call: the originally requested op/tensors, the TensorFlow Session.
At this point graph is finalized and you can not add ops.
Parameters: | run_context – A SessionRunContext object. |
---|---|
Returns: | None or a SessionRunArgs object. |
tensorcv.callbacks.hooks.
Prediction2Hook
(prediction)[source]¶Bases: tensorflow.python.training.session_run_hook.SessionRunHook
after_run
(rct, val)[source]¶Called after each call to run().
The run_values argument contains results of requested ops/tensors by before_run().
The run_context argument is the same one send to before_run call. run_context.request_stop() can be called to stop the iteration.
If session.run() raises any exceptions then after_run() is not called.
Parameters: |
|
---|
before_run
(rct)[source]¶Called before each call to run().
You can return from this call a SessionRunArgs object indicating ops or tensors to add to the upcoming run() call. These ops/tensors will be run together with the ops/tensors originally passed to the original run() call. The run args you return can also contain feeds to be added to the run() call.
The run_context argument is a SessionRunContext that provides information about the upcoming run() call: the originally requested op/tensors, the TensorFlow Session.
At this point graph is finalized and you can not add ops.
Parameters: | run_context – A SessionRunContext object. |
---|---|
Returns: | None or a SessionRunArgs object. |
tensorcv.callbacks.inference.
FeedInference
(inputs, periodic=1, inferencers=[], extra_cbs=None, infer_batch_size=None)[source]¶Bases: tensorcv.callbacks.inference.InferenceBase
tensorcv.callbacks.inference.
GANInference
(inputs=None, periodic=1, inferencers=None, extra_cbs=None)[source]¶Bases: tensorcv.callbacks.inference.InferenceBase
tensorcv.callbacks.inference.
FeedInferenceBatch
(inputs, periodic=1, batch_count=10, inferencers=[], extra_cbs=None, infer_batch_size=None)[source]¶Bases: tensorcv.callbacks.inference.FeedInference
do not use all validation data
tensorcv.callbacks.inferencer.
InferImages
(im_name, prefix=None, color=False, tanh=False)[source]¶tensorcv.callbacks.inferencer.
InferOverlay
(im_name, prefix=None, color=False, tanh=False)[source]¶tensorcv.callbacks.inputs.
FeedInput
(dataflow, placeholders)[source]¶Bases: tensorcv.callbacks.base.Callback
input using feed
tensorcv.callbacks.monitors.
Monitors
(mons)[source]¶Bases: tensorcv.callbacks.monitors.TrainingMonitor
group monitors
tensorcv.callbacks.trigger.
PeriodicTrigger
(trigger_cb, every_k_steps=None, every_k_epochs=None)[source]¶Bases: tensorcv.callbacks.base.ProxyCallback
may not need