Mercurial > ift6266
view scripts/stacked_dae/utils.py @ 138:128507ac4edf
Initial commit for the stacked convolutional denoising autoencoders
author | Owner <salahmeister@gmail.com> |
---|---|
date | Sun, 21 Feb 2010 17:30:38 -0600 |
parents | 5c79a2557f2f |
children | 7d8366fb90bf |
line wrap: on
line source
#!/usr/bin/python from jobman import DD def produit_croise_jobs(val_dict): job_list = [DD()] all_keys = val_dict.keys() for key in all_keys: possible_values = val_dict[key] new_job_list = [] for val in possible_values: for job in job_list: to_insert = job.copy() to_insert.update({key: val}) new_job_list.append(to_insert) job_list = new_job_list return job_list def test_produit_croise_jobs(): vals = {'a': [1,2], 'b': [3,4,5]} print produit_croise_jobs(vals)