Sounds like it could be a bug, especially if the forward pass runs successfully but the backwards pass fails. Could you provide a script (with dummy inputs, or something like that) that reproduces this?