sizes() would most likely correspond to the C++ function name.
The error is raised, when create_graph=True with:
RuntimeError: Expected a Tensor of type Variable but found an undefined Tensor for argument #0 'self' (checked_cast_variable at /opt/conda/conda-bld/pytorch_1579335088481/work/torch/csrc/autograd/VariableTypeManual.cpp:38)

@albanD Do you have an idea what might have gone wrong?