Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jameschapman19 committed Aug 15, 2023
1 parent 27737b6 commit f99c052
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion docs/source/examples/plot_fista.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
import torch
from sklearn.datasets import make_regression
from torch.nn import Parameter

from pytorch_lightning import seed_everything
from proxtorch.operators import L1Prox
import torch.optim as optim

seed_everything(42)

# Create synthetic data
X, y, coef = make_regression(
n_samples=100, n_features=20, noise=0.1, coef=True, random_state=42
Expand Down
2 changes: 2 additions & 0 deletions docs/source/examples/plot_lasso_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@
from sklearn.linear_model import Lasso
import matplotlib.pyplot as plt
import pytorch_lightning as pl
from pytorch_lightning import seed_everything
from proxtorch.operators import L1Prox

seed_everything(42)

class LassoRegression(pl.LightningModule):
def __init__(self, input_size, lasso_param):
Expand Down
2 changes: 1 addition & 1 deletion docs/source/examples/plot_robust_pca.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import matplotlib.pyplot as plt
import pytorch_lightning as pl
import torch
from lightning import seed_everything
from pytorch_lightning import seed_everything
from torch.utils.data import DataLoader, Dataset

from proxtorch.operators import L1Prox, TraceNormProx
Expand Down

0 comments on commit f99c052

Please sign in to comment.