Skip to content
Snippets Groups Projects
Commit c22b940a authored by Steve Schmerler's avatar Steve Schmerler
Browse files

gp: 02_two_dim: update sample syntax

parent 83d58baa
No related branches found
No related tags found
1 merge request!2Update GP slides and notebooks
...@@ -136,7 +136,9 @@ if use_noise: ...@@ -136,7 +136,9 @@ if use_noise:
# noisy train data # noisy train data
noise_std = 0.2 noise_std = 0.2
noise_dist = torch.distributions.Normal(loc=0, scale=noise_std) noise_dist = torch.distributions.Normal(loc=0, scale=noise_std)
y_train = data_train.z + noise_dist.sample_n(len(data_train.z)) y_train = data_train.z + noise_dist.sample(
sample_shape=(len(data_train.z),)
)
else: else:
# noise-free train data # noise-free train data
noise_std = 0 noise_std = 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment