I want to create a linear network with a single layer under PyTorch, but I want the weights to be manually initialized and to remain fixed.
For example the values of the weights with the model:
layer = nn.Linear(4, 1, bias=False)
weights = tensor([[ 0.6],
[0.25],
[ 0.1],
[0.05]], dtype=torch.float64)
Is this achievable? If so, how can I do it? Or is there an alternative linear function?
