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_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(sample, running_stage)[source]

Called once per_sample_transform 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

Read the Docs v: 0.7.0
Versions
latest
stable
0.7.0
0.6.0
0.5.2
0.5.1
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
docs-fix_typing
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.