Model Base Class
TumorGrowthModel3D
Bases: Module
A base class for 3D tumor growth models using PyTorch.
This class defines the interface for tumor growth models that can simulate
tumor dynamics in a 3D environment. Subclasses must implement the forward
method to define the model-specific behavior.
__init__()
Initializes the base class.
This constructor calls the parent PyTorch nn.Module
initializer.
forward(t, u)
Defines the forward pass for the tumor growth model.
Subclasses must implement this method to specify the model's behavior during the forward pass.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
t
|
Tensor
|
A tensor representing time points, typically of shape |
required |
u
|
Tensor
|
A tensor representing the input state, such as tumor properties
or environmental variables, typically of shape |
required |
Returns:
Name | Type | Description |
---|---|---|
du_dt |
Tensor
|
A tensor representing the computed output state, typically of the same shape as |
Raises:
Type | Description |
---|---|
NotImplementedError
|
If this method is not implemented in a subclass. |