Shortcuts

FlashCallback

class flash.core.data.callback.FlashCallback(*args, **kwargs)[source]

FlashCallback is an extension of pytorch_lightning.callbacks.Callback.

A callback is a self-contained program that can be reused across projects. Flash and Lightning have a callback system to execute callbacks when needed. Callbacks should capture any NON-ESSENTIAL logic that is NOT required for your lightning module to run.

Same as PyTorch Lightning, Callbacks can be provided directly to the Trainer:

trainer = Trainer(callbacks=[MyCustomCallback()])
on_collate(batch, running_stage)[source]

Called once collate has been applied to a sequence of samples.

Return type

None

on_load_sample(sample, running_stage)[source]

Called once a sample has been loaded using load_sample.

Return type

None

on_per_batch_transform(batch, running_stage)[source]

Called once per_batch_transform has been applied to a batch.

Return type

None

on_per_batch_transform_on_device(batch, running_stage)[source]

Called once per_batch_transform_on_device has been applied to a sample.

Return type

None

on_per_sample_transform_on_device(sample, running_stage)[source]

Called once per_sample_transform_on_device has been applied to a sample.

Return type

None

on_post_tensor_transform(sample, running_stage)[source]

Called once post_tensor_transform has been applied to a sample.

Return type

None

on_pre_tensor_transform(sample, running_stage)[source]

Called once pre_tensor_transform has been applied to a sample.

Return type

None

on_to_tensor_transform(sample, running_stage)[source]

Called once to_tensor_transform has been applied to a sample.

Return type

None

Read the Docs v: latest
Versions
latest
stable
0.5.0
0.4.0
0.3.2
0.3.1
0.3.0
0.2.3
0.2.2
0.2.1
0.2.0
0.1.0post1
Downloads
pdf
html
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.