diff --git a/README.md b/README.md index 6e6b4dac..03350041 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,7 @@ module_PF = NeuralNet( module_PB = NeuralNet( input_dim=env.preprocessor.output_dim, output_dim=env.n_actions - 1, - torso=module_PF.torso # We share all the parameters of P_F and P_B, except for the last layer + trunk=module_PF.trunk # We share all the parameters of P_F and P_B, except for the last layer ) module_logF = NeuralNet( input_dim=env.preprocessor.output_dim, diff --git a/testing/test_parametrizations_and_losses.py b/testing/test_parametrizations_and_losses.py index 9fe0ebcc..a2710364 100644 --- a/testing/test_parametrizations_and_losses.py +++ b/testing/test_parametrizations_and_losses.py @@ -157,7 +157,7 @@ def PFBasedGFlowNet_with_return( hidden_dim=32, n_hidden_layers=2, n_components=ndim + 1, - torso=pf_module.torso if tie_pb_to_pf else None, + trunk=pf_module.trunk if tie_pb_to_pf else None, ) elif module_name == "NeuralNet" and env_name != "Box": pb_module = NeuralNet( diff --git a/testing/test_samplers_and_trajectories.py b/testing/test_samplers_and_trajectories.py index 3f905046..318ed1d1 100644 --- a/testing/test_samplers_and_trajectories.py +++ b/testing/test_samplers_and_trajectories.py @@ -43,7 +43,7 @@ def trajectory_sampling_with_return( hidden_dim=32, n_hidden_layers=2, n_components=n_components, - torso=pf_module.torso, + trunk=pf_module.trunk, ) pf_estimator = BoxPFEstimator( env=env, diff --git a/tutorials/examples/train_box.py b/tutorials/examples/train_box.py index b6eeedc6..64dd8e01 100644 --- a/tutorials/examples/train_box.py +++ b/tutorials/examples/train_box.py @@ -118,7 +118,7 @@ def main(args): # noqa: C901 hidden_dim=args.hidden_dim, n_hidden_layers=args.n_hidden, n_components=args.n_components, - torso=pf_module.torso if args.tied else None, + trunk=pf_module.trunk if args.tied else None, ) pf_estimator = BoxPFEstimator( @@ -148,7 +148,7 @@ def main(args): # noqa: C901 output_dim=1, hidden_dim=args.hidden_dim, n_hidden_layers=args.n_hidden, - torso=None, # We do not tie the parameters of the flow function to PF + trunk=None, # We do not tie the parameters of the flow function to PF logZ_value=logZ, ) logF_estimator = ScalarEstimator(module=module, preprocessor=env.preprocessor) diff --git a/tutorials/examples/train_conditional.py b/tutorials/examples/train_conditional.py index a713465a..057ccd71 100644 --- a/tutorials/examples/train_conditional.py +++ b/tutorials/examples/train_conditional.py @@ -25,7 +25,7 @@ def build_conditional_pf_pb(env): input_dim=env.preprocessor.output_dim, output_dim=CONCAT_SIZE, hidden_dim=256, - torso=module_PF.torso, + trunk=module_PF.trunk, ) # Encoder for the Conditioning information. @@ -43,7 +43,7 @@ def build_conditional_pf_pb(env): module_final_PB = NeuralNet( input_dim=CONCAT_SIZE * 2, output_dim=env.n_actions - 1, - torso=module_final_PF.torso, + trunk=module_final_PF.trunk, ) pf_estimator = ConditionalDiscretePolicyEstimator( diff --git a/tutorials/examples/train_hypergrid_simple.py b/tutorials/examples/train_hypergrid_simple.py index d2d5bccc..67464100 100644 --- a/tutorials/examples/train_hypergrid_simple.py +++ b/tutorials/examples/train_hypergrid_simple.py @@ -26,7 +26,7 @@ module_PB = NeuralNet( input_dim=env.preprocessor.output_dim, output_dim=env.n_actions - 1, - torso=module_PF.torso, + trunk=module_PF.trunk, ) pf_estimator = DiscretePolicyEstimator( module_PF, env.n_actions, is_backward=False, preprocessor=env.preprocessor