begin generalizing input shapes