Fine-Tuning Heads
helical.models.base_models.ClassificationHead
Bases: HelicalBaseFineTuningHead
Classification Head for fine-tuning a Helical foundation model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
num_classes
|
int
|
The number of classes to predict. |
required |
dropout
|
float
|
The dropout rate to apply to the input tensor before the linear layer. |
0.02
|
Methods:
Name | Description |
---|---|
forward |
The forward method of the classification head. |
Source code in helical/models/fine_tune/fine_tuning_heads.py
forward(inputs)
Forward method of the classification head.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
inputs
|
Tensor
|
The input tensor to the classification head. |
required |
Returns:
Type | Description |
---|---|
Tensor
|
The output tensor of the classification head. |
Source code in helical/models/fine_tune/fine_tuning_heads.py
set_dim_size(dim_size)
Set the dimension size of the input tensor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dim_size
|
int
|
The dimension size of the input tensor. |
required |
Source code in helical/models/fine_tune/fine_tuning_heads.py
helical.models.base_models.RegressionHead
Bases: HelicalBaseFineTuningHead
Regression Head for fine-tuning a Helical foundation model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
num_outputs
|
int
|
The number of outputs to predict. |
required |
dropout
|
float
|
The dropout rate to apply to the input tensor before the linear layer. |
0.02
|
Methods:
Name | Description |
---|---|
forward |
The forward method of the regression head. |
Source code in helical/models/fine_tune/fine_tuning_heads.py
forward(inputs)
Forward method of the classification head.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
inputs
|
Tensor
|
The input tensor to the regression head. |
required |
Returns:
Type | Description |
---|---|
Tensor
|
The output tensor of the regression head. |
Source code in helical/models/fine_tune/fine_tuning_heads.py
set_dim_size(dim_size)
Set the dimension size of the input tensor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dim_size
|
int
|
The dimension size of the input tensor. |
required |