add grid search
This commit is contained in:
parent
bb6d06a903
commit
835213ab1b
2
main.py
2
main.py
@ -656,7 +656,7 @@ if __name__ == "__main__":
|
|||||||
'module__embed_dim': [300, 400, 500],
|
'module__embed_dim': [300, 400, 500],
|
||||||
}
|
}
|
||||||
|
|
||||||
grid = GridSearchCV(estimator=estimator, param_grid=paramsGrid, n_jobs=-1, cv=1, scoring=torch.nn.BCELoss)
|
grid = GridSearchCV(estimator=estimator, param_grid=paramsGrid, n_jobs=-1, cv=3, scoring=torch.nn.BCELoss)
|
||||||
data = np.array(model.triples['train'])
|
data = np.array(model.triples['train'])
|
||||||
data = 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(
|
dataloader = iter(DataLoader(
|
||||||
|
Loading…
Reference in New Issue
Block a user