add grid search

This commit is contained in:
thanhvc3 2023-05-17 13:16:27 +07:00
parent 9aa85307af
commit c8e8d8a660

View File

@ -658,7 +658,7 @@ if __name__ == "__main__":
grid = GridSearchCV(estimator=estimator, param_grid=paramsGrid, n_jobs=-1, cv=1)
data = np.array(model.triples['train'])
data = np.random.sample(0.2)
data = np.random.choice(np.arange(len(data)), size=int(len(data) * 0.2), replace=False)
dataloader = iter(DataLoader(
TrainDataset(data, model.p),
batch_size=len(data),