Skip to content

Commit

Permalink
default resnet: False
Browse files Browse the repository at this point in the history
  • Loading branch information
Linux-cpp-lisp committed Jan 19, 2022
1 parent ea91cab commit b44ef02
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Most recent change on the bottom.

### Changed
- `minimal.yaml`, `minimal_eng.yaml`, and `example.yaml` now use the simplified irreps options `l_max`, `parity`, and `num_features`
- Default value for `resnet` is now `False`

### Fixed
- Handle one of `per_species_shifts`/`scales` being `null` when the other is a dataset statistc
Expand Down
1 change: 0 additions & 1 deletion configs/example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ l_max: 1
parity: true # whether to include features with odd mirror parity
num_features: 32 # the multiplicity of the features
nonlinearity_type: gate # may be 'gate' or 'norm', 'gate' is recommended
resnet: false # set true to make interaction block a resnet-style update

# scalar nonlinearities to use — available options are silu, ssp (shifted softplus), tanh, and abs.
# Different nonlinearities are specified for e (even) and o (odd) parity;
Expand Down
1 change: 1 addition & 0 deletions configs/full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ num_features: 32

nonlinearity_type: gate # may be 'gate' or 'norm', 'gate' is recommended
resnet: false # set true to make interaction block a resnet-style update
# the resnet update will only be applied when the input and output irreps of the layer are the same

# scalar nonlinearities to use — available options are silu, ssp (shifted softplus), tanh, and abs.
# Different nonlinearities are specified for e (even) and o (odd) parity;
Expand Down
2 changes: 1 addition & 1 deletion docs/options/model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ invariant_neurons
resnet
^^^^^^
| Type: bool
| Default: ``True``
| Default: ``False``
nonlinearity_type
^^^^^^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion nequip/nn/_convnetlayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(
convolution=InteractionBlock,
convolution_kwargs: dict = {},
num_layers: int = 3,
resnet: bool = True,
resnet: bool = False,
nonlinearity_type: str = "gate",
nonlinearity_scalars: Dict[int, Callable] = {"e": "ssp", "o": "tanh"},
nonlinearity_gates: Dict[int, Callable] = {"e": "ssp", "o": "abs"},
Expand Down
2 changes: 1 addition & 1 deletion nequip/nn/_interaction_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def __init__(

def forward(self, data: AtomicDataDict.Type) -> AtomicDataDict.Type:
"""
Evaluate interaction Block with ResNet.
Evaluate interaction Block with ResNet (self-connection).
:param node_input:
:param node_attr:
Expand Down
3 changes: 0 additions & 3 deletions tests/unit/model/test_eng_force.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
irreps_edge_sh="0e + 1o",
r_max=4,
feature_irreps_hidden="4x0e + 4x1o",
resnet=True,
num_layers=2,
num_basis=8,
PolynomialCutoff_p=6,
Expand All @@ -47,7 +46,6 @@
irreps_edge_sh="0e + 1o",
r_max=4,
feature_irreps_hidden="4x0e + 4x1o",
resnet=True,
num_layers=2,
num_basis=8,
PolynomialCutoff_p=6,
Expand All @@ -58,7 +56,6 @@
irreps_edge_sh="0e + 1o + 2e",
r_max=4,
feature_irreps_hidden="2x0e + 2x1o + 2x2e",
resnet=False,
num_layers=2,
num_basis=3,
PolynomialCutoff_p=6,
Expand Down

0 comments on commit b44ef02

Please sign in to comment.