Can I change input size during inference?

I used different input sizes with when I build the engine. TRT outputs all zeros. Is it because I changed the hight and width of the input images? Can TRT engine process different input sizes?