       cropped = Tensor<Float>([offsetY, targetX, targetY, offsetX])
     }
 
+    // we skip the above for validation images, but keep the resize operation
+    if !applyAugmentation {
+      cropped = Tensor<Float>([0.0, 0.0, 1.0, 1.0])
+    }
+
     let imageBroadcast = imageData.reshaped(to: [1, height, width, channels])
     let bboxBroadcast = cropped.reshaped(to: [1, 4])
 

    named: "val", in: localStorageDirectory, base: base, labelDict: labelDict)
}

func applyImageNetDataAugmentation(image: Image) -> Tensor<Float> {
    // using the tensorflow imagenet demo from mlperf as reference:
    // https://github.com/mlcommons/training/blob/4f97c909f3aeaa3351da473d12eba461ace0be76/image_classification/tensorflow/official/resnet/imagenet_preprocessing.py#L94
    let imageData = image.tensor

      validation = validationSamples.inBatches(of: batchSize).lazy.map {
        makeImageNetBatch(
          samples: $0, outputSize: outputSize, mean: mean, standardDeviation: standardDeviation,
          device: device, applyAugmentation: false)
      }
    } catch {
      fatalError("Could not load ImageNet dataset: \(error)")
