Totoro
Totoro

Reputation: 544

Optimization of CNN

I'm trying to optimize the hyperparameters of my neural network in PyTorch. I'm using Skorch but the problem is that the grid-search with Skorch does not finish. I get some user warnings that are shown below, but not any result. I tried to put just 5 and 10 epoch numbers to see if the grid-search works. I want to know if something is wrong with my code or if there's some problem with Skorch.

model2 = NeuralNet(config, kernel_size)
skorch_regressor = NeuralNetRegressor(module=model2, optimizer=optim.Adam, verbose=0)
skorch_regressor

params = {
    "lr": [0.01, 0.02],
    "max_epochs": [5, 10, 20],
    "optimizer__weight_decay": [0, 0.1]

}

grid = GridSearchCV(skorch_regressor, params)
grid.fit(X_train, Y_train)

enter image description here

Upvotes: 1

Views: 138

Answers (0)

Related Questions