Skip to content

Commit

Permalink
running experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuUpadhyaya committed Jun 26, 2017
1 parent f938201 commit b42501f
Show file tree
Hide file tree
Showing 16 changed files with 66 additions and 300 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -124,4 +124,5 @@ tfrecords/
desig_pix_img/
pkl/

lsdcenv1.1/
lsdcdenv1.1/
fail/
Expand Up @@ -16,11 +16,12 @@
'predictor_propagation': '', # use the model get the designated pixel for the next step!
'action_cost_factor': 0,
# 'reuse_mean_cov':'',
# 'no_instant_gif':"",
# 'rew_all_steps':"",
# 'finalweight':10
'no_instant_gif':"",
'rew_all_steps':"",
'finalweight':10,
'no_previous_pix_distrib':'' # do not add previous pix distrib into gen_pix_distrib
}

agent = {
'T': 20,
'T': 15,
}
Expand Up @@ -16,9 +16,10 @@
'predictor_propagation': '', # use the model get the designated pixel for the next step!
'action_cost_factor': 0,
# 'reuse_mean_cov':'',
# 'no_instant_gif':"",
# 'rew_all_steps':"",
# 'finalweight':10
'no_instant_gif':"",
'rew_all_steps':"",
'finalweight':10,
'no_pixdistrib_video':''
}

agent = {
Expand Down
2 changes: 2 additions & 0 deletions installation
@@ -1,3 +1,5 @@

#install tensorflow==0.11.0
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.11.0-cp27-none-linux_x86_64.whl
pip install --ignore-installed --upgrade $TF_BINARY_URL

Expand Down
1 change: 0 additions & 1 deletion lsdcenv1.1/src/gym
Submodule gym deleted from a86b4b
1 change: 0 additions & 1 deletion lsdcenv1.1/src/ray
Submodule ray deleted from 8532ba
200 changes: 0 additions & 200 deletions python/3Dvideoprediction/pcloudpublisher/CMakeLists.txt

This file was deleted.

65 changes: 0 additions & 65 deletions python/3Dvideoprediction/pcloudpublisher/package.xml

This file was deleted.

13 changes: 11 additions & 2 deletions python/lsdc/algorithm/policy/cem_controller_goalimage_sawyer.py
Expand Up @@ -22,11 +22,12 @@ class CEM_controller():
"""
Cross Entropy Method Stochastic Optimizer
"""
def __init__(self, ag_params, policyparams, predictor = None):
def __init__(self, ag_params, policyparams, predictor = None, save_subdir=None):
print 'init CEM controller'
self.agentparams = ag_params
self.policyparams = policyparams

self.save_subdir = save_subdir
self.t = None

if 'verbose' in self.policyparams:
Expand Down Expand Up @@ -287,7 +288,14 @@ def video_pred(self, last_frames, last_states, actions, itr):

if self.verbose: #and itr == self.policyparams['iterations']-1:
# print 'creating visuals for best sampled actions at last iteration...'
file_path = self.netconf['current_dir'] + '/verbose'
if self.save_subdir != None:
file_path = self.netconf['current_dir']+ '/'+ self.save_subdir +'/verbose'
else:
file_path = self.netconf['current_dir'] + '/verbose'


if not os.path.exists(file_path):
os.makedirs(file_path)

def best(inputlist):
outputlist = [np.zeros_like(a)[:self.K] for a in inputlist]
Expand All @@ -296,6 +304,7 @@ def best(inputlist):
outputlist[tstep][ind] = inputlist[tstep][bestindices[ind]]
return outputlist


cPickle.dump(best(gen_images), open(file_path + '/gen_image_t{}.pkl'.format(self.t), 'wb'))
if 'use_goalimage' not in self.policyparams:
cPickle.dump(best(gen_distrib), open(file_path + '/gen_distrib_t{}.pkl'.format(self.t), 'wb'))
Expand Down

0 comments on commit b42501f

Please sign in to comment.