Closed Seun-Ajayi closed 4 months ago
Can you please add a test case?
Implemented RobertaForTokenClassification
and RobertaForQuestionAnswering
too.
CrossEntropyLoss
method takes ignore_index
as an argument but this parameter is not included in mlx's version of it, so I just did without the parameter. This is in the RobertaForQuestionAnswering
class
loss_fct = CrossEntropyLoss(ignore_index=ignored_index)
My workaround
loss_fct = nn.losses.cross_entropy()
Can you please add a test case?
I would
We are good now
We are good now
Thank you!
Proposed changes
Implemented
RobertaForSequenceClassification
in theroberta.py
module. AddedRobertaClassificationHead
along the line and addedSequenceClassifierOutput
class to themodelling_outputs.py
script since it is the output for the sequence classifier.Types of changes
What types of changes does your code introduce? Put an
x
in the boxes that applyFor
multi_label_classification
problem type,BCEWithLogitsLoss
is used but this is not present in mlx-core moduleso I had to use
binary_cross_entropy
How else could I have handled this?