Created
October 20, 2019 06:29
-
-
Save Niranjankumar-c/c9415971f1b3ffe40c033ffb9e9220f6 to your computer and use it in GitHub Desktop.
data for visualizing the dropout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
N = 50 #number of data points | |
noise = 0.3 | |
#generate the train data | |
X_train = torch.unsqueeze(torch.linspace(-1, 1, N),1) | |
Y_train = X_train + noise * torch.normal(torch.zeros(N,1), torch.ones(N,1)) | |
#generate the test data | |
X_test = torch.unsqueeze(torch.linspace(-1,1,N),1) | |
Y_test = X_test + noise * torch.normal(torch.zeros(N,1), torch.ones(N,1)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment