You can solve this by reading the code doc. This resolves this link:

  
      github.com
  
  
    pytorch/pytorch/blob/master/torch/optim/optimizer.py 84
from collections import defaultdict, Iterable

import torch
from copy import deepcopy
from itertools import chain
from torch.autograd import Variable

required = object()


class Optimizer(object):
    """Base class for all optimizers.

    Arguments:
        params (iterable): an iterable of :class:`Variable` s or
            :class:`dict` s. Specifies what Variables should be optimized.
        defaults: (dict): a dict containing default values of optimization
            options (used when a parameter group doesn't specify them).
    """



  This file has been truncated. show original

  
  
    
    
  
  


>Arguments:
    params (iterable): an iterable of :class:`Variable` s or
        :class:`dict` s. Specifies what Variables should be optimized.

You just need to list all params you want to update.
This is an exaple for you.

optimizer = torch.optim.Adam( {‘params’: model.conv.parameters()} )