add grid search

This commit is contained in:
thanhvc3 2023-05-17 13:20:58 +07:00
parent c8e8d8a660
commit 410e725bf2

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.choice(np.arange(len(data)), size=int(len(data) * 0.2), replace=False)
data = 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),