Skip to content

Commit

Permalink
Merge pull request #79 from rctn/harrison/whiten
Browse files Browse the repository at this point in the history
Whitening Update
  • Loading branch information
HarrisonSantiago authored Dec 2, 2024
2 parents 60f3342 + 97ec9fe commit 08068b8
Show file tree
Hide file tree
Showing 13 changed files with 1,634 additions and 372 deletions.
962 changes: 962 additions & 0 deletions examples/Data_Whitening.ipynb

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions examples/inference_natural_images.ipynb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions examples/ista_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"id": "218ed8be",
"metadata": {},
"outputs": [],
Expand All @@ -16,7 +16,7 @@
"\n",
"from sparsecoding import inference\n",
"from sparsecoding import models\n",
"from sparsecoding.data.transforms.patch import sample_random_patches\n",
"from sparsecoding.transforms import sample_random_patches\n",
"from sparsecoding.visualization import plot_dictionary\n",
"from sparsecoding.visualization import plot_patches"
]
Expand Down
4 changes: 2 additions & 2 deletions examples/sparse_coding.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"id": "218ed8be",
"metadata": {},
"outputs": [],
Expand All @@ -15,7 +15,7 @@
"import numpy as np\n",
"from scipy.io import loadmat\n",
"\n",
"from sparsecoding.data.transforms.patch import sample_random_patches\n",
"from sparsecoding.transforms import sample_random_patches\n",
"from sparsecoding import inference\n",
"\n",
"from sparsecoding import models\n",
Expand Down
2 changes: 1 addition & 1 deletion sparsecoding/datasets.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import torch
import os
from scipy.io import loadmat
from sparsecoding.transforms.patch import patchify
from sparsecoding.transforms import patchify
from torch.utils.data import Dataset

from sparsecoding.priors import Prior
Expand Down
7 changes: 7 additions & 0 deletions sparsecoding/transforms/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from .whiten import whiten, compute_whitening_stats
from .images import whiten_images, compute_image_whitening_stats, WhiteningTransform, \
quilt, patchify, sample_random_patches

__all__ = ['quilt', 'patchify', 'sample_random_patches', 'whiten',
'compute_whitening_stats', 'compute_image_whitening_stats',
'WhiteningTransform', 'whiten_images']
Loading

0 comments on commit 08068b8

Please sign in to comment.