Spaces:
Build error
Build error
Update .vscode/transform
Browse files- .vscode/transform +20 -1
.vscode/transform
CHANGED
@@ -1,4 +1,23 @@
|
|
1 |
-
from transformers import
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
import torch
|
3 |
|
4 |
# Load pre-trained text and vision models
|
|
|
1 |
+
from transformers import Trainer, TrainingArguments
|
2 |
+
|
3 |
+
training_args = TrainingArguments(
|
4 |
+
output_dir="./results",
|
5 |
+
evaluation_strategy="epoch",
|
6 |
+
learning_rate=2e-5,
|
7 |
+
per_device_train_batch_size=16,
|
8 |
+
per_device_eval_batch_size=16,
|
9 |
+
num_train_epochs=3,
|
10 |
+
weight_decay=0.01,
|
11 |
+
)
|
12 |
+
|
13 |
+
trainer = Trainer(
|
14 |
+
model=model,
|
15 |
+
args=training_args,
|
16 |
+
train_dataset=train_dataset,
|
17 |
+
eval_dataset=eval_dataset,
|
18 |
+
)
|
19 |
+
|
20 |
+
trainer.train()from transformers import AutoModel, AutoTokenizer, AutoFeatureExtractor
|
21 |
import torch
|
22 |
|
23 |
# Load pre-trained text and vision models
|