Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module torchlayers has no attribute L1 #14

Open
chrislemke opened this issue Jan 4, 2022 · 1 comment
Open

Module torchlayers has no attribute L1 #14

chrislemke opened this issue Jan 4, 2022 · 1 comment

Comments

@chrislemke
Copy link

chrislemke commented Jan 4, 2022

Hey!
I have the following issue.

Using Python 3.9.7 and torchlayers 0.1.1.

Trying to do this:

import torchlayers as tl

        # Regularize all parameters of Linear module
        regularized_layer = tl.L1(tl.Linear(30), weight_decay=1e-5

From here.

Unfortunately, I am getting this:

AttributeError: module torchlayers has no attribute L1

If I inspect torchlayers.regularization it does not contain L1. 🤔

Any idea? Thanks in advance.

@jeslago
Copy link

jeslago commented Apr 21, 2022

You have to install the nightly version pip install --user torchlayers-nightly and then from torchlayers.regularization import L1 (or something of the sort).

It works for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants