import torch


def generate_fake_data(w, b, samples_num, pdf="normal"):
    """Generate y = w*x + b + noises"""
    m, n = w.size()
    # print(m, n)
    # mean_tensor = torch.arange(0.0, m + 1)
    # std_tensor = torch.arange(0.0, m + 1)
    # x = torch.normal(mean=mean_tensor, std=std_tensor)
    x = torch.normal(mean=0, std=1, size=(n, samples_num))
    # noise = torch.normal(0.0, 0.01, b.size())
    y = torch.matmul(w, x) + b
    # print(y)
    return x, y