SolveQ / src /dataset.py
ByteJoseph's picture
Upload folder using huggingface_hub
dbadc63 verified
Raw
History Blame Contribute Delete
193 Bytes
import torch
def get_data(n=200):
x = torch.linspace(-10,10,n).unsqueeze(1)
y = 2 * x + 3
return x, y
if __name__ == '__main__':
x,y = get_data()
print(x)
print(y)