ForwardFinetuner¶
embetter.finetune.ForwardFinetuner
¶
Create a feed forward model to finetune the embeddings towards a class.
Parameters
Name | Type | Description | Default |
---|---|---|---|
hidden_dim |
The size of the hidden layer | 50 |
|
n_epochs |
The number of epochs to run the optimiser for | 500 |
|
learning_rate |
The learning rate of the feed forward model | 0.01 |
fit(self, X, y)
¶
Show source code in finetune/_forward.py
43 44 45 |
|
Fits the finetuner.
partial_fit(self, X, y, classes=None)
¶
Show source code in finetune/_forward.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
|
Fits the finetuner using the partial_fit API.
transform(self, X, y=None)
¶
Show source code in finetune/_forward.py
75 76 77 78 |
|
Transforms the data according to the sklearn api by using the hidden layer.