Skip to content

Commit

Permalink
rename methods
Browse files Browse the repository at this point in the history
  • Loading branch information
josephdviviano committed Dec 8, 2023
1 parent 6c0d8aa commit 364e52d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tutorials/notebooks/intro_gfn_continuous_line.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
" sf = torch.FloatTensor([float(\"inf\"), float(\"inf\")], ).to(s0.device)\n",
" super().__init__(s0=s0, sf=sf) # Overwriting the default sf of -inf.\n",
"\n",
" def make_States_class(self) -> type[States]:\n",
" def make_states_class(self) -> type[States]:\n",
" env = self\n",
"\n",
" class LineStates(States):\n",
Expand All @@ -153,7 +153,7 @@
"\n",
" return LineStates\n",
"\n",
" def make_Actions_class(self) -> type[Actions]:\n",
" def make_actions_class(self) -> type[Actions]:\n",
" env = self\n",
"\n",
" class LineActions(Actions):\n",
Expand Down
4 changes: 2 additions & 2 deletions tutorials/notebooks/intro_gfn_smiley.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1624,7 +1624,7 @@
" preprocessor=IdentityPreprocessor(output_dim=state_dim)\n",
" )\n",
"\n",
" def make_States_class(self) -> type[DiscreteStates]:\n",
" def make_states_class(self) -> type[DiscreteStates]:\n",
" \"Creates a States class for this environment\"\n",
" env = self\n",
"\n",
Expand Down Expand Up @@ -1917,7 +1917,7 @@
"source": [
"# Note that here, we have the log edge flows, so we take the sum(exp(log_flows)) to\n",
"# calculate the partition function estimate.\n",
"s_0 = env.make_States_class()(torch.zeros(6))\n",
"s_0 = env.make_states_class()(torch.zeros(6))\n",
"print(\"Partition function estimate Z={:.2f}\".format(\n",
" sum(torch.exp(estimator(s_0)[:6])) # logsumexp.\n",
" )\n",
Expand Down

0 comments on commit 364e52d

Please sign in to comment.