See if you can follow the implementation in the example above,
if you look in the RNNBase class, it’s defined in the forward method,
        _impl = _rnn_impls[self.mode]
        if batch_sizes is None:
            result = _impl(input, hx, self._flat_weights, self.bias, self.num_layers,
                           self.dropout, self.training, self.bidirectional, self.batch_first)
        else:
            result = _impl(input, batch_sizes, hx, self._flat_weights, self.bias,
                           self.num_layers, self.dropout, self.training, self.bidirectional)

see if you can follow this and get that to work, you may need to wrap torch._VF.rnn_relu within a torch.nn.Module maybe? Also, given the VF package is prefaced with an underscore it’s probably not meant to be used within the python API.
Also, if you have an error can you share the error with a minimal reproducible example?