Skip to content

additional events in the deepgrow interaction engine #2056

Description

@wyli

Is your feature request related to a problem? Please describe.
This is a feature request for adding extra engine events within the click simulation loops during the deepgrow model training:

for j in range(self.max_interactions):
inputs, _ = engine.prepare_batch(batchdata)
inputs = inputs.to(engine.state.device)
engine.network.eval()
with torch.no_grad():
if engine.amp:
with torch.cuda.amp.autocast():
predictions = engine.inferer(inputs, engine.network)
else:
predictions = engine.inferer(inputs, engine.network)
batchdata.update({CommonKeys.PRED: predictions})
batchdata[self.key_probability] = torch.as_tensor(
([1.0 - ((1.0 / self.max_interactions) * j)] if self.train else [1.0]) * len(inputs)
)
batchdata = self.transforms(batchdata)

the main benefit is to have flexible simulation handlers attached to the inner loops

cc @danieltudosiu @diazandr3s @SachidanandAlle

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions