mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-09 21:09:18 +00:00
[test] merge old components to test to model zoo (#4945)
* [test] add custom models in model zoo * [test] update legacy test * [test] update model zoo * [test] update gemini test * [test] remove components to test
This commit is contained in:
@@ -34,9 +34,9 @@ def data_gen_for_masked_image_modeling():
|
||||
output_transform_fn = lambda x: x
|
||||
|
||||
# function to get the loss
|
||||
loss_fn_for_vit_model = lambda x: x.pooler_output.mean()
|
||||
loss_fn_for_image_classification = lambda x: x.logits.mean()
|
||||
loss_fn_for_masked_image_modeling = lambda x: x.loss
|
||||
loss_fn_for_vit_model = lambda x: x["pooler_output"].mean()
|
||||
loss_fn_for_image_classification = lambda x: x["logits"].mean()
|
||||
loss_fn_for_masked_image_modeling = lambda x: x["loss"]
|
||||
|
||||
# register the following models
|
||||
# transformers.ViTModel,
|
||||
|
Reference in New Issue
Block a user