Repository: pykeen/pykeen
Issue: RGCN RuntimeError: trying to backward through graph a second time. (has parameters but no reset_parameters)
Root cause: Documentation Deficiency

### Describe the bug

Hi, 

I want to use the RGCN model from [pykeen.models.unimodal.rgcn](https://pykeen.readthedocs.io/en/stable/api/pykeen.models.RGCN.html) and encounter a runtime error during training. 

Before the error occurs I see the following print: 
```python
Layers RGCNLayer(
  (fwd): BasesDecomposition(
    (relation_representations): LowRankRepresentation(
      (bases): Embedding(
        (_embeddings): Embedding(4, 250000)
      )
    )
  )
  (bwd): BasesDecomposition(
    (relation_representations): LowRankRepresentation(
      (bases): Embedding(
        (_embeddings): Embedding(4, 250000)
      )
    )
  )
  (self_loop): Linear(in_features=500, out_features=500, bias=True)
  (dropout): Dropout(p=0.2, inplace=False)
) has parameters, but no reset_parameters.
Layers RGCNLayer(
  (fwd): BasesDecomposition(
    (relation_representations): LowRankRepresentation(
      (bases): Embedding(
        (_embeddings): Embedding(4, 250000)
      )
    )
  )
  (bwd): BasesDecomposition(
    (relation_representations): LowRankRepresentation(
      (bases): Embedding(
        (_embeddings): Embedding(4, 250000)
      )
    )
  )
  (self_loop): Linear(in_features=500, out_features=500, bias=True)
  (dropout): Dropout(p=0.2, inplace=False)
) has parameters, but no reset_parameters.
```

Then,  the following runtime error occurs immediately after training has started: 
```python-traceback
Traceback (most recent call last):
  [...]
  File ".../test.py", line 400, in train_step
    batch_loss.backward()
  File ".../anaconda3/lib/python3.11/site-packages/torch/_tensor.py", line 492, in backward
    torch.autograd.backward(
  File ".../anaconda3/lib/python3.11/site-packages/torch/autograd/__init__.py", line 251, in backward
    Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
RuntimeError: Trying to backward through the graph a second time (or directly access saved tensors after they have already been freed). Saved intermediate values of the graph are freed when you call .backward() or autograd.grad(). Specify retain_graph=True if you need to backward through the graph a second time or if you need to access saved tensors after calling backward.
```

Do you have any idea where the error comes from and how it can be avoided? 

Thanks a lot in advance :-) 


### How to reproduce

My model is initialized as follows: 
```python
conf.model = "RGCN"
conf.seed = 1234
loss = pykeen.losses.BCEWithLogitsLoss

pykeen_models = __import__('pykeen').models
cls = getattr(pykeen_models, conf.model)
model = cls(triples_factory=triples_factory, loss=loss, random_seed=conf.seed)
```
The triple factory looks like this: 
```
TriplesFactory(num_entities=3007, num_relations=12, create_inverse_triples=False, num_triples=2934, path="[...]/train.txt")
```

My training loop iterates through batches of triples in a `torch.data.dataloader` as follows
```python
self.model.train()
for i_batch, batch in enumerate(train_data_loader):
    self.optimizer.zero_grad()
    batch = batch.to(self.device)
    self.model.to(self.device)
    pred_scores = self.model.score_hrt(batch.triples)
    batch_loss = self.model.loss(scores=pred_scores, labels=batch.labels)
    batch_loss.backward()
    self.optimizer.step()
```

My code worked without problems for the models `NTN`, `QuatE`, `ConvKB`, `TransE`, `BoxE` and `CrossE`. The error only appears for `RGCN`. 

For me it looks like `RGCN` does not have a `reset_parameters` method that the other models have since they inherit from `ERModel` and the superconstructor calls in in the `__init__()`

### Environment

Python 3.11.5
torch 2.1.0
pykeen 1.10.1
Apple M1 Max, macOS Sonoma 14.1

### Additional information

_No response_

### Issue Template Checks

- [X] This is not a feature request (use a different issue template if it is)
- [X] This is not a question (use the [discussions](https://github.com/pykeen/pykeen/discussions/new) forum instead)
- [X] I've read the text explaining why including environment information is important and understand if I omit this information that my issue will be dismissed

Hi @LuisaWerner ,

I think the problem is fixed by calling `model.post_parameter_update()` after each optimizer step.

*Background*: RGCN's forward call involves
- a message passing step over the full training graph to obtain enriched entity representations
- an evaluation of an interaction function on top of these enriched representations

Since the message passing part can become a computational bottleneck in evaluation, `RGCN` supports to cache the enriched representations, i.e., perform the message passing only once and then re-use the already calculated vectors for the next evaluation batch. This cache gets invalidated whenever the parameters change, i.e., after each parameter update. This is done by `post_parameter_update`.

Thanks! This solved my problem :-)

I still get the message in the printouts but this doesn't seem to affect the model. 

```
Layers RGCNLayer(
  (fwd): BasesDecomposition(
    (relation_representations): LowRankRepresentation(
      (bases): Embedding(
        (_embeddings): Embedding(4, 250000)
      )
    )
  )
  (bwd): BasesDecomposition(
    (relation_representations): LowRankRepresentation(
      (bases): Embedding(
        (_embeddings): Embedding(4, 250000)
      )
    )
  )
  (self_loop): Linear(in_features=500, out_features=500, bias=True)
  (dropout): Dropout(p=0.2, inplace=False)
) has parameters, but no reset_parameters.
Layers RGCNLayer(
  (fwd): BasesDecomposition(
    (relation_representations): LowRankRepresentation(
      (bases): Embedding(
        (_embeddings): Embedding(4, 250000)
      )
    )
  )
  (bwd): BasesDecomposition(
    (relation_representations): LowRankRepresentation(
      (bases): Embedding(
        (_embeddings): Embedding(4, 250000)
      )
    )
  )
  (self_loop): Linear(in_features=500, out_features=500, bias=True)
  (dropout): Dropout(p=0.2, inplace=False)
) has parameters, but no reset_parameters.
```