-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
126 additions
and
12,352 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,21 @@ | ||
# multilearn | ||
Pytorch wrapper for multi-task learning | ||
Pytorch wrapper for multi-task learning. The GitHub repo can be found in [here](https://github.com/leschultz/multilearn.git). | ||
|
||
## Coding Style | ||
|
||
Python scripts follow PEP 8 guidelines. A usefull tool to use to check a coding style is flake8. | ||
|
||
``` | ||
flake8 <script> | ||
``` | ||
|
||
## Authors | ||
|
||
### Graduate Students | ||
* **Lane Schultz** - *Main Contributer* - [leschultz](https://github.com/leschultz) | ||
|
||
## Acknowledgments | ||
|
||
* The [Computational Materials Group (CMG)](https://matmodel.engr.wisc.edu/) at the University of Wisconsin - Madison | ||
* Professor Dane Morgan [ddmorgan](https://github.com/ddmorgan) and Dr. Ryan Jacobs [rjacobs914](https://github.com/rjacobs914) for computational material science guidence | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
from sklearn.preprocessing import StandardScaler | ||
from multilearn import datasets, models, utils | ||
from torch import optim, nn | ||
|
||
|
||
def main(): | ||
|
||
save_dir = 'outputs' | ||
lr = 1e-4 | ||
batch_size = 32 | ||
n_epochs = 1000 | ||
tasks = ['asr'] | ||
|
||
# Data | ||
X, y = datasets.load(tasks) | ||
data = datasets.splitter(X, y, tasks, train_size=1) | ||
|
||
for k, v in data.items(): | ||
data[k]['scaler'] = StandardScaler() | ||
data[k]['loss'] = nn.L1Loss() | ||
|
||
model = models.MultiNet(tasks=tasks, input_arch={500: 1}) | ||
optimizer = optim.Adam | ||
|
||
out = utils.train( | ||
model, | ||
optimizer, | ||
data, | ||
n_epochs=n_epochs, | ||
batch_size=batch_size, | ||
lr=lr, | ||
save_dir=save_dir, | ||
) | ||
|
||
print(out['df_loss']) | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export PYTHONPATH=../../:$PYTHONPATH | ||
python3 run.py | ||
export PYTHONPATH=../../../src/:$PYTHONPATH | ||
python3 fit.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
from sklearn.preprocessing import StandardScaler | ||
from multilearn import datasets, models, utils | ||
from torch import optim, nn | ||
|
||
|
||
def main(): | ||
|
||
save_dir = 'outputs' | ||
lr = 1e-4 | ||
batch_size = 32 | ||
n_epochs = 1000 | ||
tasks = ['asr', 'opband', 'stability'] | ||
|
||
# Data | ||
X, y = datasets.load(tasks) | ||
data = datasets.splitter(X, y, tasks, train_size=1) | ||
|
||
for k, v in data.items(): | ||
data[k]['scaler'] = StandardScaler() | ||
data[k]['loss'] = nn.L1Loss() | ||
|
||
model = models.MultiNet(tasks=tasks, input_arch={500: 1}) | ||
optimizer = optim.Adam | ||
|
||
out = utils.train( | ||
model, | ||
optimizer, | ||
data, | ||
n_epochs=n_epochs, | ||
batch_size=batch_size, | ||
lr=lr, | ||
save_dir=save_dir, | ||
) | ||
|
||
print(out['df_loss']) | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export PYTHONPATH=../../:$PYTHONPATH | ||
python3 run.py | ||
export PYTHONPATH=../../../src/:$PYTHONPATH | ||
python3 fit.py |
Empty file.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
Oops, something went wrong.