Parameter optimization of a pytorch Deep Learning model

Hello friends,
I have designed a deep learning model using the PyTorch framework for image classification. I know to use Keras tuner to optimize a deep learning model designed using Keras. Can anyone help me in optimizing the hyperparameters of a deep learning model designed using the Pytorch framework? I have two options

  1. Convert the PyTorch model to a Keras model and use a Keras tuner on it.
  2. Use any hyperparameter optimization method on the PyTorch model.
    Can anyone suggest me and help me with this problem of hyperparameter optimization.

you can use

model= Model()
optimizer = torch.optim.Adam(model.parameters(), lr=0.0001) #ADAM
optimizer = torch.optim.SGD(model.parameters(), lr=0.0001) # SGD

Then you can call


When looking into Hyperparameter optimization you could have a look into “AutoML” techniques which automate the optimization of hyperparamters. One example within PyTorch is Auto-PyTorch, you can find their github repo here: GitHub - automl/Auto-PyTorch: Automatic architecture search and hyperparameter optimization for PyTorch !