Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into fix_whiten
Browse files Browse the repository at this point in the history
Merge flake8 fixes.
  • Loading branch information
9q9q committed Dec 19, 2023
2 parents 8d1aac0 + 16eb930 commit 64fe099
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions sparsecoding/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ def __init__(self, inference_method, n_basis, n_features,
device : torch.device, default=torch.device("cpu")
Which device to utilize
check_for_dictionary_nan : bool, default=False
Flag to check for nans in the dictionary after gradient
updates and normalizations. Raises ValueError if nan
found
Flag to check for nans in the dictionary after gradient
updates and normalizations. Raises ValueError if nan
found
"""
super(SparseCoding, self).__init__()
self.inference_method = inference_method
Expand Down
2 changes: 1 addition & 1 deletion tutorials/vanilla/src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def create_patches(imgs, epochs, batch_size, N, rng):
patches : Tensor of size (epochs, batch_size, pixels_per_patch).
"""
# TODO: use rng here when sample_random_patches supports it.
patches = sample_random_patches(int(np.sqrt(N)), batch_size*epochs,
patches = sample_random_patches(int(np.sqrt(N)), batch_size*epochs,
torch.unsqueeze(imgs, 1))
patches = patches.reshape(epochs, batch_size, N)
return patches
Expand Down

0 comments on commit 64fe099

Please sign in to comment.