The example shows how to set different parameters for layer.parameters() you just need to dig a little deeper into the details.
E.g. for a Linear layer, the weight and bias parameters are named mylayer.weight and mylayer.bias.
optim.SGD([
                {'params': mylayer.weight},
                {'params': mylayer.bias, 'lr': 1e-3}
            ], lr=1e-2, momentum=0.9)