Hi,
It seems to works quite fine for me using your module:
import torch
from torch import nn

class GRU(nn.Module):
    def __init__(self, input_size, hidden_size, output_size, num_layers):
        super(GRU, self).__init__()
        self.hidden_size = hidden_size
        self.num_layers = num_layers
        self.gru = nn.GRU(input_size, hidden_size, num_layers, batch_first=False)
        self.softmax = nn.LogSoftmax(dim=2)
        self.h2o = nn.Linear(hidden_size, output_size)
        self.relu = nn.ReLU(inplace=True)

    def forward(self, x, h):
        out, h = self.gru(x, h)
        out = self.h2o(out)
        out = self.relu(out)
        out = self.softmax(out)
        return out, h

    def init_hidden(self, batch_size, device):
        weight = next(self.parameters()).data
        hidden = weight.new(self.num_layers, batch_size, self.hidden_size).zero_().to(device)
        return hidden

mod = GRU(4, 3, 3, 2)

inp = torch.rand(3, 1, 4)
h = torch.rand(2, 1, 3)

out, new_h = mod(inp, h)

out.sum().backward()

Could you provide a code sample that reproduces the issue please?