diff --git a/src/metatrain/experimental/soap_bpnn/model.py b/src/metatrain/experimental/soap_bpnn/model.py index a3d0d4ea..fc8e7e8c 100644 --- a/src/metatrain/experimental/soap_bpnn/model.py +++ b/src/metatrain/experimental/soap_bpnn/model.py @@ -123,14 +123,6 @@ def __init__(self, model_hypers: Dict, dataset_info: DatasetInfo) -> None: unit="unitless", per_atom=True ) - # creates a composition weight tensor that can be directly indexed by species, - # this can be left as a tensor of zero or set from the outside using - # set_composition_weights (recommended for better accuracy) - n_outputs = len(self.outputs) - self.register_buffer( - "composition_weights", - torch.zeros((n_outputs, max(self.atomic_types) + 1)), - ) # buffers cannot be indexed by strings (torchscript), so we create a single # tensor for all output. Due to this, we need to slice the tensor when we use # it and use the output name to select the correct slice via a dictionary diff --git a/src/metatrain/experimental/soap_bpnn/tests/test_regression.py b/src/metatrain/experimental/soap_bpnn/tests/test_regression.py index c36f337d..4845f240 100644 --- a/src/metatrain/experimental/soap_bpnn/tests/test_regression.py +++ b/src/metatrain/experimental/soap_bpnn/tests/test_regression.py @@ -41,10 +41,10 @@ def test_regression_init(): expected_output = torch.tensor( [ [-0.038599025458], - [ 0.111374437809], - [ 0.091115802526], + [0.111374437809], + [0.091115802526], [-0.056339077652], - [-0.025491207838] + [-0.025491207838], ] ) @@ -107,10 +107,10 @@ def test_regression_train(): expected_output = torch.tensor( [ [-0.106249026954], - [ 0.039981484413], + [0.039981484413], [-0.142682999372], [-0.031701669097], - [-0.016210660338] + [-0.016210660338], ] )