Created
June 14, 2018 11:42
-
-
Save jangirrishabh/bc17c06a07ea3b915827e89f3c13a2ae to your computer and use it in GitHub Desktop.
Snippet for toyCarIRL, blog usage, not executable
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
def getRLAgentFE(self, W, i): #get the feature expectations of a new poliicy using RL agent | |
IRL_helper(W, self.behavior, self.num_frames, i) # train the agent and save the model in a file used below | |
saved_model = 'saved-models_'+self.behavior+str(i)+'/164-150-100-50000-'+str(self.num_frames)+'.h5' # use the saved model to get the FE | |
model = neural_net(self.num_states, [164, 150], saved_model) | |
return play(model, W)#return feature expectations by executing the learned policy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment