Skip to content

Commit 26b53b1

Browse files
authored
Improve dynamic batch size solution when calibration and evaluation stage (#530)
1 parent 6ca7c9a commit 26b53b1

File tree

18 files changed

+176
-87
lines changed

18 files changed

+176
-87
lines changed

examples/pytorch/eager/image_recognition/efficientnet/conf_efficientnet_b0.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ quantization: # optional. tuning constrai
2626
ImageFolder:
2727
root: /path/to/calibration/dataset # NOTE: modify to calibration dataset location if needed
2828
transform:
29-
RandomResizedCrop:
30-
size: 224
31-
RandomHorizontalFlip: {}
29+
Resize:
30+
size: 256
31+
CenterCrop:
32+
size: 224
3233
ToTensor: {}
3334
Normalize:
3435
mean: [0.485, 0.456, 0.406]

examples/pytorch/eager/image_recognition/efficientnet/conf_mobilenetv3_rw.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ quantization: # optional. tuning constrai
2626
ImageFolder:
2727
root: /path/to/calibration/dataset # NOTE: modify to calibration dataset location if needed
2828
transform:
29-
RandomResizedCrop:
30-
size: 224
31-
RandomHorizontalFlip: {}
29+
Resize:
30+
size: 256
31+
CenterCrop:
32+
size: 224
3233
ToTensor: {}
3334
Normalize:
3435
mean: [0.485, 0.456, 0.406]

examples/pytorch/eager/image_recognition/imagenet/cpu/prune_and_ptq/ptq_conf.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ quantization: # optional. tuning constrai
2626
ImageFolder:
2727
root: /path/to/calibration/dataset # NOTE: modify to calibration dataset location if needed
2828
transform:
29-
RandomResizedCrop:
29+
Resize:
30+
size: 256
31+
CenterCrop:
3032
size: 224
31-
RandomHorizontalFlip: {}
3233
ToTensor: {}
3334
Normalize:
3435
mean: [0.485, 0.456, 0.406]

examples/pytorch/eager/image_recognition/imagenet/cpu/ptq/conf.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ quantization: # optional. tuning constrai
2626
ImageFolder:
2727
root: /path/to/calibration/dataset # NOTE: modify to calibration dataset location if needed
2828
transform:
29-
RandomResizedCrop:
29+
Resize:
30+
size: 256
31+
CenterCrop:
3032
size: 224
31-
RandomHorizontalFlip: {}
3233
ToTensor: {}
3334
Normalize:
3435
mean: [0.485, 0.456, 0.406]

examples/pytorch/eager/image_recognition/imagenet/cpu/ptq/conf_dump_tensors.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ quantization: # optional. tuning constrai
2626
ImageFolder:
2727
root: /path/to/calibration/dataset # NOTE: modify to calibration dataset location if needed
2828
transform:
29-
RandomResizedCrop:
29+
Resize:
30+
size: 256
31+
CenterCrop:
3032
size: 224
31-
RandomHorizontalFlip: {}
3233
ToTensor: {}
3334
Normalize:
3435
mean: [0.485, 0.456, 0.406]

examples/pytorch/eager/image_recognition/imagenet/gpu/conf.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ quantization: # optional. tuning constrai
2828
ImageFolder:
2929
root: /path/to/calibration/dataset # NOTE: modify to calibration dataset location if needed
3030
transform:
31-
RandomResizedCrop:
31+
Resize:
32+
size: 256
33+
CenterCrop:
3234
size: 224
33-
RandomHorizontalFlip: {}
3435
ToTensor: {}
3536
Normalize:
3637
mean: [0.485, 0.456, 0.406]

examples/pytorch/eager/image_recognition/peleenet/conf.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ quantization: # optional. tuning constrai
2626
ImageFolder:
2727
root: /path/to/calibration/dataset # NOTE: modify to calibration dataset location if needed
2828
transform:
29-
RandomResizedCrop:
30-
size: 224
31-
RandomHorizontalFlip: {}
29+
Resize:
30+
size: 256
31+
CenterCrop:
32+
size: 224
3233
ToTensor: {}
3334
Normalize:
3435
mean: [0.485, 0.456, 0.406]

examples/pytorch/eager/image_recognition/resnest/conf.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ quantization: # optional. tuning constrai
2626
ImageFolder:
2727
root: /path/to/calibration/dataset # NOTE: modify to calibration dataset location if needed
2828
transform:
29-
RandomResizedCrop:
30-
size: 224
31-
RandomHorizontalFlip: {}
29+
Resize:
30+
size: 256
31+
CenterCrop:
32+
size: 224
3233
ToTensor: {}
3334
Normalize:
3435
mean: [0.485, 0.456, 0.406]

examples/pytorch/eager/image_recognition/se_resnext/conf.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ quantization: # optional. tuning constrai
2626
ImageFolder:
2727
root: /path/to/calibration/dataset # NOTE: modify to calibration dataset location if needed
2828
transform:
29-
RandomResizedCrop:
30-
size: 224
31-
RandomHorizontalFlip: {}
29+
Resize:
30+
size: 256
31+
CenterCrop:
32+
size: 224
3233
ToTensor: {}
3334
Normalize:
3435
mean: [0.485, 0.456, 0.406]

examples/pytorch/fx/image_recognition/imagenet/cpu/ptq/conf.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ quantization: # optional. tuning constrai
2626
ImageFolder:
2727
root: /path/to/calibration/dataset # NOTE: modify to calibration dataset location if needed
2828
transform:
29-
RandomResizedCrop:
29+
Resize:
30+
size: 256
31+
CenterCrop:
3032
size: 224
31-
RandomHorizontalFlip: {}
3233
ToTensor: {}
3334
Normalize:
3435
mean: [0.485, 0.456, 0.406]

0 commit comments

Comments
 (0)