You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
generic_model_args no longer exists. Update some references to it, mostly in doc.
This fixes the testing of all the yaml files in test_forward pass.
Reviewed By: shapovalov
Differential Revision: D38789202
fbshipit-source-id: f11417efe772d7f86368b3598aa66c52b1309dbf
The argument `n_eval_cameras` sets the number of renderring viewpoints sampled on a trajectory, which defaults to a circular fly-around;
@@ -124,18 +129,21 @@ In the config, inner parameters can be propagated using `_args` postfix, e.g. to
124
129
125
130
The root of the hierarchy is defined by `ExperimentConfig` dataclass.
126
131
It has top-level fields like `eval_only` which was used above for running evaluation by adding a CLI override.
127
-
Additionally, it has non-leaf nodes like `generic_model_args`, which dispatches the config parameters to `GenericModel`. Thus, changing the model parameters may be achieved in two ways: either by editing the config file, e.g.
132
+
Additionally, it has non-leaf nodes like `model_factory_ImplicitronModelFactory_args.model_GenericModel_args`, which dispatches the config parameters to `GenericModel`.
133
+
Thus, changing the model parameters may be achieved in two ways: either by editing the config file, e.g.
128
134
```yaml
129
-
generic_model_args:
130
-
render_image_width: 800
131
-
raysampler_args:
132
-
n_pts_per_ray_training: 128
135
+
model_factory_ImplicitronModelFactory_args:
136
+
model_GenericModel_args:
137
+
render_image_width: 800
138
+
raysampler_args:
139
+
n_pts_per_ray_training: 128
133
140
```
134
141
135
142
or, equivalently, by adding the following to `pytorch3d_implicitron_runner` arguments:
See the documentation in `pytorch3d/implicitron/tools/config.py` for more details.
@@ -149,11 +157,12 @@ This means that other Configurables can refer to them using the base type, while
149
157
In that case, `_args` node name has to include the implementation type.
150
158
More specifically, to change renderer settings, the config will look like this:
151
159
```yaml
152
-
generic_model_args:
153
-
renderer_class_type: LSTMRenderer
154
-
renderer_LSTMRenderer_args:
155
-
num_raymarch_steps: 10
156
-
hidden_size: 16
160
+
model_factory_ImplicitronModelFactory_args:
161
+
model_GenericModel_args:
162
+
renderer_class_type: LSTMRenderer
163
+
renderer_LSTMRenderer_args:
164
+
num_raymarch_steps: 10
165
+
hidden_size: 16
157
166
```
158
167
159
168
See the documentation in `pytorch3d/implicitron/tools/config.py` for more details on the configuration system.
@@ -188,15 +197,17 @@ class XRayRenderer(BaseRenderer, torch.nn.Module):
188
197
```
189
198
190
199
Please note `@registry.register` decorator that registers the plug-in as an implementation of `Renderer`.
191
-
IMPORTANT: In order for it to run, the class (or its enclosing module) has to be imported in your launch script. Additionally, this has to be done before parsing the root configuration class `ExperimentConfig`.
200
+
IMPORTANT: In order for it to run, the class (or its enclosing module) has to be imported in your launch script.
201
+
Additionally, this has to be done before parsing the root configuration class `ExperimentConfig`.
192
202
Simply add `import .x_ray_renderer` in the beginning of `experiment.py`.
193
203
194
204
After that, you should be able to change the config with:
195
205
```yaml
196
-
generic_model_args:
197
-
renderer_class_type: XRayRenderer
198
-
renderer_XRayRenderer_args:
199
-
n_pts_per_ray: 128
206
+
model_factory_ImplicitronModelFactory_args:
207
+
model_GenericModel_args:
208
+
renderer_class_type: XRayRenderer
209
+
renderer_XRayRenderer_args:
210
+
n_pts_per_ray: 128
200
211
```
201
212
202
213
to replace the implementation and potentially override the parameters.
Please look at the annotations of the respective classes or functions for the lists of hyperparameters. `tests/experiment.yaml` shows every possible option if you have no user-defined classes.
266
+
Please look at the annotations of the respective classes or functions for the lists of hyperparameters.
267
+
`tests/experiment.yaml`shows every possible option if you have no user-defined classes.
0 commit comments