rslearn.models.singletask¶
singletask ¶
SingleTaskModel for rslearn.
SingleTaskModel ¶
Bases: Module
Standard model wrapper.
SingleTaskModel first passes its inputs through the sequential encoder models.
Then, it passes the computed features through the decoder models, obtaining the outputs and targets from the last module (which also receives the targets).
Source code in rslearn/models/singletask.py
forward ¶
forward(context: ModelContext, targets: list[dict[str, Any]] | None = None) -> ModelOutput
Apply the sequence of modules on the inputs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
context
|
ModelContext
|
the model context. |
required |
targets
|
list[dict[str, Any]] | None
|
optional list of target dicts |
None
|
Returns:
| Type | Description |
|---|---|
ModelOutput
|
the model output. |