Replacing reshape with resize