2

how to make grid_search to deep learning fastai (i use LSTM) to tune hyperpramters of Learner - https://docs.fast.ai/basic_train.html#Learner my code is :

from fastai.train import Learner
from fastai.train import DataBunch

model = NeuralNet(embedding_matrix, y_aux_train.shape[-1])
learn = Learner(databunch, model, loss_func=custom_loss)   

i wonder how can i tune the hyper-parameters like in standard classification algorithm of sklearn using -https://scikit-learn.org/stable/modules/grid_search.html .

4

1 回答 1

2

You can use https://github.com/skorch-dev/skorch that allows you to use Sklearn grid search on a pytorch model, then wrap this model in a fastai learner.

于 2019-08-01T15:33:22.593 回答