Browse Source

fix eval

tags/v1.1.0
VectorSL 5 years ago
parent
commit
57935da157
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      model_zoo/official/cv/resnet/gpu_resnet_benchmark.py

+ 5
- 1
model_zoo/official/cv/resnet/gpu_resnet_benchmark.py View File

@@ -73,7 +73,11 @@ def create_dataset(dataset_path, do_train, repeat_num=1, batch_size=32, target="
# define map operations
normalize_op = C.Normalize(mean=mean, std=std)
if dtype == "fp16":
normalize_op = C.NormalizePad(mean=mean, std=std, dtype="float16")
if args_opt.eval:
x_dtype = "float32"
else:
x_dtype = "float16"
normalize_op = C.NormalizePad(mean=mean, std=std, dtype=x_dtype)
if do_train:
trans = [
C.RandomCropDecodeResize(image_size, scale=(0.08, 1.0), ratio=(0.75, 1.333)),


Loading…
Cancel
Save