How to do inplace operation on custom parameters?

I have a custom parameter W = nn.Parameter(torch.randn(1)) When i try to do W += 2 or when i try to do += 2 , I get the following error:
RuntimeError: a leaf Variable that requires grad is being used in an in-place operation.
Please help