Skip to content

Comments

first version of training loop for dyna#5

Open
Misterhoonster wants to merge 32 commits intoKempnerInstitute:mainfrom
Misterhoonster:hoon-dyna
Open

first version of training loop for dyna#5
Misterhoonster wants to merge 32 commits intoKempnerInstitute:mainfrom
Misterhoonster:hoon-dyna

Conversation

@Misterhoonster
Copy link
Contributor

Could you take a look at my starter training loop logic?


# --- Network Definition ---

class RecurrentQNetwork(nn.Module):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have a single Network with

  1. setup
  2. initialize_carry
  3. call for when its used with read data
  4. apply_model

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

call: takes in observation, applies rnn, returns state + predictions(q_vals)
apply_model: takes in state and action, applies model (for us environment, for somebody else a neural network), returns next_state + predictions(q_vals)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

call(self, observation) --> [AgentState, Predictions]

apply_model(self, state, action) --> [AgentState, Predictions]

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think of this as the Agent


# --- Network Definition ---

class RecurrentQNetwork(nn.Module):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

call: takes in observation, applies rnn, returns state + predictions(q_vals)
apply_model: takes in state and action, applies model (for us environment, for somebody else a neural network), returns next_state + predictions(q_vals)


# --- Network Definition ---

class RecurrentQNetwork(nn.Module):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

call(self, observation) --> [AgentState, Predictions]

apply_model(self, state, action) --> [AgentState, Predictions]


# --- Network Definition ---

class RecurrentQNetwork(nn.Module):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think of this as the Agent

@Misterhoonster
Copy link
Contributor Author

Hey Wilka, just updated my dyna file with your suggested changes!

@Misterhoonster
Copy link
Contributor Author

Pushed the new version with the Loss class! Can you take a look, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants