Make sure the input frame size is large enough that the downsampled layers also have a nonzero resolution.