Introduces the concept of a forward pass cache. This can be used when grading multiple candidates, from which a subset of features have the same values and are present in all candidates.
The usage of the forward cache has the following stages:
create - (called with the create_forward_cache) creates the appropriate BlockCache for the given BlockTrait class. Executed only once.
prepare - (called with the prepare_forward_cache) the BlockCache is reset & filled with the pre-calculated values that will be used in the next step. The input for this should be the features that will be repeated in all the following forward passes.
forward pass with cache - (called with the forward_with_cache) uses the pre-calculated values from the BlockCache for the given BlockTrait class. The calculation itself is normally the same as with the forward cache, with the exception of costly operations. An example with FFM would be setting the contra fields for the repeating features.
The parsing has also been updated to reduce calculations & support the preparation step.
Introduces the concept of a forward pass cache. This can be used when grading multiple candidates, from which a subset of features have the same values and are present in all candidates.
The usage of the forward cache has the following stages:
create_forward_cache
) creates the appropriateBlockCache
for the givenBlockTrait
class. Executed only once.prepare_forward_cache
) theBlockCache
is reset & filled with the pre-calculated values that will be used in the next step. The input for this should be the features that will be repeated in all the following forward passes.forward_with_cache
) uses the pre-calculated values from theBlockCache
for the givenBlockTrait
class. The calculation itself is normally the same as with the forward cache, with the exception of costly operations. An example with FFM would be setting the contra fields for the repeating features.The parsing has also been updated to reduce calculations & support the preparation step.