Fix Gradient Accumulation issue (#34191)
* quick fix * 3 losses * oups * fix * nits * check how it scales for special models * propagate for conditiona detr * propagate * propagate * propagate * fixes * propagate changes * update * fixup * nits * f string * fixes * more fixes * ? * nit * arg annoying f string * nits * grumble * update * nit * refactor * fix fetch tests * nit * nit * Update src/transformers/loss/loss_utils.py Co-authored-by: Kashif Rasul <kashif.rasul@gmail.com> * update * nit * fixup * make pass * nits * port code to more models * fixup * ntis * arf * update * update * nits * update * fix * update * nits * fine * agjkfslga.jsdlkgjklas * nits * fix fx? * update * update * styel * fix imports * update * update * fixup to fix the torch fx? --------- Co-authored-by: Kashif Rasul <kashif.rasul@gmail.com>
This commit is contained in:
@@ -144,6 +144,57 @@ SPECIAL_CASES_TO_ALLOW = {
|
||||
"initializer_range",
|
||||
"supported_aspect_ratios",
|
||||
],
|
||||
"ConditionalDetrConfig": [
|
||||
"bbox_cost",
|
||||
"bbox_loss_coefficient",
|
||||
"class_cost",
|
||||
"cls_loss_coefficient",
|
||||
"dice_loss_coefficient",
|
||||
"focal_alpha",
|
||||
"giou_cost",
|
||||
"giou_loss_coefficient",
|
||||
"mask_loss_coefficient",
|
||||
],
|
||||
"DetrConfig": [
|
||||
"bbox_cost",
|
||||
"bbox_loss_coefficient",
|
||||
"class_cost",
|
||||
"dice_loss_coefficient",
|
||||
"eos_coefficient",
|
||||
"giou_cost",
|
||||
"giou_loss_coefficient",
|
||||
"mask_loss_coefficient",
|
||||
],
|
||||
"GroundingDinoConfig": [
|
||||
"bbox_cost",
|
||||
"bbox_loss_coefficient",
|
||||
"class_cost",
|
||||
"focal_alpha",
|
||||
"giou_cost",
|
||||
"giou_loss_coefficient",
|
||||
],
|
||||
"RTDetrConfig": [
|
||||
"eos_coefficient",
|
||||
"focal_loss_alpha",
|
||||
"focal_loss_gamma",
|
||||
"matcher_alpha",
|
||||
"matcher_bbox_cost",
|
||||
"matcher_class_cost",
|
||||
"matcher_gamma",
|
||||
"matcher_giou_cost",
|
||||
"use_focal_loss",
|
||||
"weight_loss_bbox",
|
||||
"weight_loss_giou",
|
||||
"weight_loss_vfl",
|
||||
],
|
||||
"YolosConfig": [
|
||||
"bbox_cost",
|
||||
"bbox_loss_coefficient",
|
||||
"class_cost",
|
||||
"eos_coefficient",
|
||||
"giou_cost",
|
||||
"giou_loss_coefficient",
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user