-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor dev docs and add dtype details during model building
- Loading branch information
Showing
3 changed files
with
25 additions
and
15 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,6 @@ Developer Guide | |
|
||
.. toctree:: | ||
|
||
extending | ||
contributing | ||
tools | ||
under_the_hood | ||
extending |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Under The Hood | ||
############## | ||
|
||
This page explains key aspects of the infrastructure. | ||
|
||
Model Building | ||
============== | ||
|
||
|
||
Model Builder Decorator | ||
----------------------- | ||
The following decorator should be used for new model builders, e.g. :: | ||
|
||
@nequip.model.model_builder | ||
def my_new_model_builder(arg1, arg2): | ||
return model(arg1, arg2) | ||
|
||
|
||
.. autofunction:: nequip.model.model_builder | ||
|
||
Dtypes in Model Building | ||
------------------------ | ||
``model_dtype`` is imposed by using ``torch.set_default_dtype()`` to set the default ``dtype`` to ``model_dtype`` for the duration of model building, such that parameter tensors created during model building will be in the default ``dtype``, which was set to ``model_dtype``. |