You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug Description
the function to visualize classification boundary, visualize_classification(model, data, label) plots a transposed image. To fix this, meshgrid indexing has to be changed from 'ij' to 'xy'
To Reproduce
Run the notebook on a dataset which is not symmetric in x1 and x2. For example moons dataset on sklearn.
def generate_continuous_xor(self):
X,y = make_moons(n_samples=self.size,random_state=42)
X = np.float32(X)
y = np.float32(y)
mean = np.mean(X, axis=0)
std = np.std(X, axis=0)
X = (X - mean) / std
data = torch.from_numpy(X) #torch.randint(low=0, high=2, size=(self.size, 2), dtype=torch.float32)
label = torch.from_numpy(y).to(torch.long)
# To make it slightly more challenging, we add a bit of gaussian noise to the data points.
data += self.std * torch.randn(data.shape)
self.data = data
self.label = label
Screenshots
Earlier:
New:
Runtime environment:
Local computer and Google Colab
both on CPU only or GPU
This hasn't been noticed till now since original dataset was symmetric in x1 and x2
The text was updated successfully, but these errors were encountered:
Tutorial: 2
Introduction to PyTorch
Bug Description
the function to visualize classification boundary,
visualize_classification(model, data, label)
plots a transposed image. To fix this,meshgrid
indexing has to be changed from'ij'
to'xy'
To Reproduce
Run the notebook on a dataset which is not symmetric in x1 and x2. For example moons dataset on sklearn.
Screenshots
Earlier:
New:
Runtime environment:
This hasn't been noticed till now since original dataset was symmetric in x1 and x2
The text was updated successfully, but these errors were encountered: