The code looks generally alright, besides the usage of the deprecated Variable, which should be removed.
Nevertheless input_image should be a tensor. Otherwise the previous lines of code should already create errors.
Since the code is not executable, I guess that in the model’s forward method some integers might be passed to specific layers.