and I want my weights, be like this
W = torch.Tensor([[1 ,0, -1],[2, 0 ,-2], [1, 0 ,-1]])
Is there anyway to do that?

you don’t even have to implement a special PyTorch function for that. E.g. you can assign these values to
with torch.no_grad():
    self.fc1.weight = ... 

where ... would be replaced by a tensor (e.g. W in your case) or a function that creates a tensor with the right dimensions (assuming that in a real usecase, it’s probably to tedious to type out the whole tensor).