This commit is contained in:
dsyoon
2022-08-09 00:37:30 +09:00
parent 9725368faf
commit 31f3bff0eb
2 changed files with 4 additions and 4 deletions

View File

@@ -40,7 +40,7 @@ class VitTrainer:
self.label2id = {'none': 0, 'sell': 1, 'buy': 2}
self.args = TrainingArguments(
f"stock_vit_predictor",
os.path.join(self.RESOURCE_PATH, 'model', f"stock_vit_predictor"),
save_strategy="epoch",
evaluation_strategy="epoch",
learning_rate=2e-5,
@@ -49,7 +49,7 @@ class VitTrainer:
weight_decay=0.01,
load_best_model_at_end=True,
metric_for_best_model="accuracy",
logging_dir='logs',
logging_dir=os.path.join(self.RESOURCE_PATH, 'model', 'logs'),
remove_unused_columns=False,
num_train_epochs=14,
)

View File

@@ -66,7 +66,7 @@ class StockPredictor:
id2label=self.id2label,
label2id=self.label2id)
args = TrainingArguments(
f"stock_vit_predictor",
os.path.join(self.RESOURCE_PATH, 'model', f"stock_vit_predictor"),
save_strategy="epoch",
evaluation_strategy="epoch",
learning_rate=2e-5,
@@ -75,7 +75,7 @@ class StockPredictor:
weight_decay=0.01,
load_best_model_at_end=True,
metric_for_best_model="accuracy",
logging_dir='logs',
logging_dir=os.path.join(self.RESOURCE_PATH, 'model', 'logs'),
remove_unused_columns=False,
num_train_epochs=4,
)