Conversation
henryre
left a comment
There was a problem hiding this comment.
Definitely needs to be tested as well. For next rev, can use the MNIST small example script
keras/utils.py
Outdated
|
|
||
| # Load TFs | ||
| # Assume they are present in config['train_module'] as list called tfs | ||
| tfs = import_module(config['train_module']).tfs |
There was a problem hiding this comment.
This seems like way too strong of an assumption. Any other ideas on how to load in TFs?
There was a problem hiding this comment.
Fixed in latest commit- we just pickle them using the cloud lib (a good logging / reproducibility step regardless), then just load them in; much simpler. And all handled in the train_scripts.py file
keras/utils.py
Outdated
| with open(config_path, 'r') as f: | ||
| def load_pretrained_tan(path): | ||
| # Load config dictionary from run log | ||
| with open(os.path.join(path, 'run_log.json'), 'r') as f: |
There was a problem hiding this comment.
Is this where this file is always located? I think it's usually in logs, just like this for the pretrained dir
keras/tanda_keras.py
Outdated
|
|
||
| def __init__(self, | ||
| tan, | ||
| tan_path, |
There was a problem hiding this comment.
Definitely need to allow user to pass in TAN object. Can use isinstance(tan, str)
experiments/cifar10/train.py
Outdated
|
|
||
| # Make sure dims and current module name is included in the run log | ||
| # Note: this is currently kind of hackey, should clean up... | ||
| FLAGS.__flags['train_module'] = re.sub(r'\/', '.', |
There was a problem hiding this comment.
Breaks if any experiment subdir contains "tanda" right?
There was a problem hiding this comment.
Also shouldnt this be somewhere in train_scripts.py?
|
@henryre ready for re-review! Can be tested when training new TANs |
|
Ok will look soon! |
henryre
left a comment
There was a problem hiding this comment.
Let's run a basic test here to make sure these changes work
experiments/cifar10/train.py
Outdated
| from __future__ import unicode_literals | ||
|
|
||
| from dataset import load_cifar10_data | ||
| import sys |
experiments/cifar10/train.py
Outdated
| import sys | ||
| import re | ||
|
|
||
| from .dataset import load_cifar10_data |
| import tensorflow as tf | ||
| import tensorflow.contrib.slim as slim | ||
| import sys | ||
| import cloud |
There was a problem hiding this comment.
Needs to be added to package requirement
There was a problem hiding this comment.
Also why this instead of e.g. dill?
keras/utils.py
Outdated
| from __future__ import unicode_literals | ||
|
|
||
| import json | ||
| import pickle |
pretrained/cifar10/logs/run_log.json
Outdated
| @@ -0,0 +1,61 @@ | |||
| { | |||
experiments/train_scripts.py
Outdated
| import re | ||
| import tensorflow as tf | ||
| import tensorflow.contrib.slim as slim | ||
| import sys |
|
@henryre Addressed all inline comments |
experiments/cifar10/train.py
Outdated
| from __future__ import print_function | ||
| from __future__ import unicode_literals | ||
|
|
||
| import re |
keras/utils.py
Outdated
| from __future__ import unicode_literals | ||
|
|
||
| import json | ||
| from six import pickle |
python-package-requirement.txt
Outdated
| scipy>=0.18 | ||
| six | ||
| tensorflow>=1.2 | ||
| cloud No newline at end of file |
|
@henryre changes made |
Still needs to be tested