I cannot see anything obviously wrong besides some minor issues:

your F.max_pool1d won’t do anything, as you are using a kernel size and stride of 1
could you use torch.tensor (lowercase t) to create X and y? Your code should work, but the usage of torch.Tensor is not recommended, as it might return an uninitialized tensor

Could you use a small data sample (e.g. just 10 observations) and try to overfit your model?
If this doesn’t work, there might be some bugs in the code I’m missing.