Do proper switching for mask value in masked_fprop.