Data Loaders and Stuff

This commit is contained in:
illiumst 2019-09-29 19:59:09 +02:00
parent aa802cb2be
commit 221565f4ec
26 changed files with 267 additions and 18 deletions

161
.gitignore.txt Normal file
View File

@ -0,0 +1,161 @@
# My Local Settings
/data/
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
/.idea/
# CMake
cmake-build-*/
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Created by https://www.gitignore.io/api/python
# Edit at https://www.gitignore.io/?templates=python
### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
.python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# End of https://www.gitignore.io/api/python

View File

@ -31,8 +31,8 @@ class LightningModuleOverrides:
return self.network.forward(x)
@data_loader
def tng_dataloader(self):
num_workers = 0 # os.cpu_count() // 2
def train_dataloader(self):
num_workers = 0 # os.cpu_count() // 2
return DataLoader(DataContainer(os.path.join('data', 'training'), self.size, self.step),
shuffle=True, batch_size=10000, num_workers=num_workers)
"""
@ -73,6 +73,17 @@ class LightningModule(pl.LightningModule, ABC):
# REQUIRED
raise NotImplementedError
@abstractmethod
def configure_optimizers(self):
# REQUIRED
raise NotImplementedError
@pl.data_loader
def train_dataloader(self):
# REQUIRED
raise NotImplementedError
"""
def validation_step(self, batch, batch_nb):
# OPTIONAL
pass
@ -81,19 +92,6 @@ class LightningModule(pl.LightningModule, ABC):
# OPTIONAL
pass
@abstractmethod
def configure_optimizers(self):
# REQUIRED
raise NotImplementedError
@pl.data_loader
def tng_dataloader(self):
# REQUIRED
raise NotImplementedError
# return DataLoader(MNIST(os.getcwd(), train=True, download=True,
# transform=transforms.ToTensor()), batch_size=32)
"""
@pl.data_loader
def val_dataloader(self):
# OPTIONAL

View File

@ -0,0 +1 @@
{"name": "default", "version": 0, "tags_path": "C:\\Users\\steff\\Google Drive\\LMU\\Research\\ae_toolbox_torch\\output\\AE_Model\\Sun_Sep_29_12-35-27_2019\\default\\version_0/meta_tags.csv", "metrics_path": "C:\\Users\\steff\\Google Drive\\LMU\\Research\\ae_toolbox_torch\\output\\AE_Model\\Sun_Sep_29_12-35-27_2019\\default\\version_0/metrics.csv", "autosave": false, "description": null, "created_at": "2019-09-29 10:35:27.965484", "exp_hash": "default_v0"}

View File

@ -0,0 +1,8 @@
key,value
step,5
features,6
size,9
latent_dim,2
model,AE_Model
refresh,False
future_predictions,False
1 key value
2 step 5
3 features 6
4 size 9
5 latent_dim 2
6 model AE_Model
7 refresh False
8 future_predictions False

View File

@ -0,0 +1,2 @@
loss,epoch,created_at
1.454,0.0,2019-09-29 10:41:14.039965
1 loss epoch created_at
2 1.454 0.0 2019-09-29 10:41:14.039965

View File

@ -0,0 +1 @@
{"name": "default", "version": 0, "tags_path": "C:\\Users\\steff\\Google Drive\\LMU\\Research\\ae_toolbox_torch\\output\\AE_Model\\Sun_Sep_29_12-44-13_2019\\default\\version_0/meta_tags.csv", "metrics_path": "C:\\Users\\steff\\Google Drive\\LMU\\Research\\ae_toolbox_torch\\output\\AE_Model\\Sun_Sep_29_12-44-13_2019\\default\\version_0/metrics.csv", "autosave": false, "description": null, "created_at": "2019-09-29 10:44:13.614075", "exp_hash": "default_v0"}

View File

@ -0,0 +1,8 @@
key,value
step,5
features,6
size,9
latent_dim,2
model,AE_Model
refresh,False
future_predictions,True
1 key value
2 step 5
3 features 6
4 size 9
5 latent_dim 2
6 model AE_Model
7 refresh False
8 future_predictions True

View File

@ -0,0 +1 @@
{"name": "default", "version": 0, "tags_path": "C:\\Users\\steff\\Google Drive\\LMU\\Research\\ae_toolbox_torch\\output\\AE_Model\\Sun_Sep_29_12-44-29_2019\\default\\version_0/meta_tags.csv", "metrics_path": "C:\\Users\\steff\\Google Drive\\LMU\\Research\\ae_toolbox_torch\\output\\AE_Model\\Sun_Sep_29_12-44-29_2019\\default\\version_0/metrics.csv", "autosave": false, "description": null, "created_at": "2019-09-29 10:44:29.534657", "exp_hash": "default_v0"}

View File

@ -0,0 +1,8 @@
key,value
step,5
features,6
size,9
latent_dim,2
model,AE_Model
refresh,False
future_predictions,True
1 key value
2 step 5
3 features 6
4 size 9
5 latent_dim 2
6 model AE_Model
7 refresh False
8 future_predictions True

View File

@ -0,0 +1,3 @@
loss,epoch,created_at
1.372,0.0,2019-09-29 10:44:34.492200
0.267,1.0,2019-09-29 10:54:22.294891
1 loss epoch created_at
2 1.372 0.0 2019-09-29 10:44:34.492200
3 0.267 1.0 2019-09-29 10:54:22.294891

View File

@ -0,0 +1 @@
{"name": "default", "version": 0, "tags_path": "C:\\Users\\steff\\Google Drive\\LMU\\Research\\ae_toolbox_torch\\output\\SAAE_Model\\Sun_Sep_29_12-54-18_2019\\default\\version_0/meta_tags.csv", "metrics_path": "C:\\Users\\steff\\Google Drive\\LMU\\Research\\ae_toolbox_torch\\output\\SAAE_Model\\Sun_Sep_29_12-54-18_2019\\default\\version_0/metrics.csv", "autosave": false, "description": null, "created_at": "2019-09-29 10:54:18.863108", "exp_hash": "default_v0"}

View File

@ -0,0 +1,8 @@
key,value
step,5
features,6
size,9
latent_dim,2
model,SAAE_Model
refresh,False
future_predictions,True
1 key value
2 step 5
3 features 6
4 size 9
5 latent_dim 2
6 model SAAE_Model
7 refresh False
8 future_predictions True

View File

@ -0,0 +1,48 @@
loss,epoch,created_at
0.471,0.0,2019-09-29 10:54:25.127533
0.076,1.0,2019-09-29 11:04:46.930249
0.069,2.0,2019-09-29 11:14:02.826272
0.089,3.0,2019-09-29 11:23:11.776641
0.068,4.0,2019-09-29 11:32:19.540023
0.066,5.0,2019-09-29 11:41:27.129607
0.067,6.0,2019-09-29 11:50:33.679401
0.071,7.0,2019-09-29 11:59:38.747566
0.068,8.0,2019-09-29 12:08:46.713434
0.067,9.0,2019-09-29 12:17:55.462982
0.07,10.0,2019-09-29 12:27:03.690029
0.066,11.0,2019-09-29 12:36:10.274328
0.066,12.0,2019-09-29 12:45:17.844777
0.064,13.0,2019-09-29 12:54:25.440055
0.064,14.0,2019-09-29 13:03:32.662178
0.063,15.0,2019-09-29 13:12:39.334202
0.063,16.0,2019-09-29 13:21:45.282941
0.063,17.0,2019-09-29 13:30:50.702369
0.062,18.0,2019-09-29 13:39:56.479320
0.062,19.0,2019-09-29 13:49:03.009732
0.062,20.0,2019-09-29 13:58:09.206604
0.062,21.0,2019-09-29 14:07:16.674273
0.062,22.0,2019-09-29 14:16:32.081830
0.061,23.0,2019-09-29 14:25:47.816996
0.061,24.0,2019-09-29 14:34:59.053729
0.061,25.0,2019-09-29 14:44:12.326646
0.061,26.0,2019-09-29 14:53:20.545392
0.061,27.0,2019-09-29 15:02:29.076439
0.061,28.0,2019-09-29 15:11:40.214715
0.061,29.0,2019-09-29 15:20:47.708415
0.061,30.0,2019-09-29 15:29:55.151460
0.061,31.0,2019-09-29 15:39:02.450643
0.061,32.0,2019-09-29 15:48:13.678387
0.061,33.0,2019-09-29 15:57:22.619685
0.061,34.0,2019-09-29 16:06:32.276767
0.061,35.0,2019-09-29 16:15:39.175331
0.061,36.0,2019-09-29 16:24:48.090009
0.061,37.0,2019-09-29 16:33:53.686359
0.061,38.0,2019-09-29 16:43:01.209447
0.061,39.0,2019-09-29 16:52:09.086088
0.061,40.0,2019-09-29 17:01:17.997290
0.06,41.0,2019-09-29 17:10:24.687865
0.061,42.0,2019-09-29 17:19:33.252531
0.061,43.0,2019-09-29 17:28:40.294962
0.06,44.0,2019-09-29 17:37:50.408505
0.06,45.0,2019-09-29 17:46:57.046547
0.06,46.0,2019-09-29 17:56:05.325744
1 loss epoch created_at
2 0.471 0.0 2019-09-29 10:54:25.127533
3 0.076 1.0 2019-09-29 11:04:46.930249
4 0.069 2.0 2019-09-29 11:14:02.826272
5 0.089 3.0 2019-09-29 11:23:11.776641
6 0.068 4.0 2019-09-29 11:32:19.540023
7 0.066 5.0 2019-09-29 11:41:27.129607
8 0.067 6.0 2019-09-29 11:50:33.679401
9 0.071 7.0 2019-09-29 11:59:38.747566
10 0.068 8.0 2019-09-29 12:08:46.713434
11 0.067 9.0 2019-09-29 12:17:55.462982
12 0.07 10.0 2019-09-29 12:27:03.690029
13 0.066 11.0 2019-09-29 12:36:10.274328
14 0.066 12.0 2019-09-29 12:45:17.844777
15 0.064 13.0 2019-09-29 12:54:25.440055
16 0.064 14.0 2019-09-29 13:03:32.662178
17 0.063 15.0 2019-09-29 13:12:39.334202
18 0.063 16.0 2019-09-29 13:21:45.282941
19 0.063 17.0 2019-09-29 13:30:50.702369
20 0.062 18.0 2019-09-29 13:39:56.479320
21 0.062 19.0 2019-09-29 13:49:03.009732
22 0.062 20.0 2019-09-29 13:58:09.206604
23 0.062 21.0 2019-09-29 14:07:16.674273
24 0.062 22.0 2019-09-29 14:16:32.081830
25 0.061 23.0 2019-09-29 14:25:47.816996
26 0.061 24.0 2019-09-29 14:34:59.053729
27 0.061 25.0 2019-09-29 14:44:12.326646
28 0.061 26.0 2019-09-29 14:53:20.545392
29 0.061 27.0 2019-09-29 15:02:29.076439
30 0.061 28.0 2019-09-29 15:11:40.214715
31 0.061 29.0 2019-09-29 15:20:47.708415
32 0.061 30.0 2019-09-29 15:29:55.151460
33 0.061 31.0 2019-09-29 15:39:02.450643
34 0.061 32.0 2019-09-29 15:48:13.678387
35 0.061 33.0 2019-09-29 15:57:22.619685
36 0.061 34.0 2019-09-29 16:06:32.276767
37 0.061 35.0 2019-09-29 16:15:39.175331
38 0.061 36.0 2019-09-29 16:24:48.090009
39 0.061 37.0 2019-09-29 16:33:53.686359
40 0.061 38.0 2019-09-29 16:43:01.209447
41 0.061 39.0 2019-09-29 16:52:09.086088
42 0.061 40.0 2019-09-29 17:01:17.997290
43 0.06 41.0 2019-09-29 17:10:24.687865
44 0.061 42.0 2019-09-29 17:19:33.252531
45 0.061 43.0 2019-09-29 17:28:40.294962
46 0.06 44.0 2019-09-29 17:37:50.408505
47 0.06 45.0 2019-09-29 17:46:57.046547
48 0.06 46.0 2019-09-29 17:56:05.325744

View File

@ -22,9 +22,9 @@ args.add_argument('--step', default=5)
args.add_argument('--features', default=6)
args.add_argument('--size', default=9)
args.add_argument('--latent_dim', default=2)
args.add_argument('--model', default='AE_Model')
args.add_argument('--model', default='SAAE_Model')
args.add_argument('--refresh', type=strtobool, default=False)
args.add_argument('--future_predictions', type=strtobool, default=False)
args.add_argument('--future_predictions', type=strtobool, default=True)
class AE_Model(AutoEncoder_LO, LightningModule):
@ -102,7 +102,7 @@ if __name__ == '__main__':
trainer = Trainer(experiment=exp,
max_nb_epochs=250,
gpus=[0],
add_log_row_interval=1000,
row_log_interval=1000,
# checkpoint_callback=checkpoint_callback
)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB