Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

Commit

Permalink
Renamed test package for more specific name.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-sz committed Nov 5, 2021
1 parent 1b6ed61 commit e82c0c3
Show file tree
Hide file tree
Showing 17 changed files with 29 additions and 14 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
lint:
pre-commit run --all-files


test:
python -m unittest -f tests/test_*.py
@for f in $(shell ls test_resnet_rs/test*.py); do \
echo $${f};\
python $${f};\
done
35 changes: 23 additions & 12 deletions scripts/test_local_output_consistency.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"weights_path": os.path.join(ROOT_DIR, "weights/resnet-rs-50-i160.h5"),
"original_outputs": os.path.join(
ROOT_DIR,
"tests/assets/original_outputs/resnetrs50_i160_original_logits_ema.npy",
"test_resnet_rs/assets/original_outputs/"
"resnetrs50_i160_original_logits_ema.npy",
),
},
{
Expand All @@ -34,7 +35,8 @@
"weights_path": os.path.join(ROOT_DIR, "weights/resnet-rs-101-i160.h5"),
"original_outputs": os.path.join(
ROOT_DIR,
"tests/assets/original_outputs/resnetrs101_i160_original_logits_ema.npy",
"test_resnet_rs/assets/original_outputs/"
"resnetrs101_i160_original_logits_ema.npy",
),
},
{
Expand All @@ -43,7 +45,8 @@
"weights_path": os.path.join(ROOT_DIR, "weights/resnet-rs-101-i192.h5"),
"original_outputs": os.path.join(
ROOT_DIR,
"tests/assets/original_outputs/resnetrs101_i192_original_logits_ema.npy",
"test_resnet_rs/assets/original_outputs/"
"resnetrs101_i192_original_logits_ema.npy",
),
},
{
Expand All @@ -52,7 +55,8 @@
"weights_path": os.path.join(ROOT_DIR, "weights/resnet-rs-152-i192.h5"),
"original_outputs": os.path.join(
ROOT_DIR,
"tests/assets/original_outputs/resnetrs152_i192_original_logits_ema.npy",
"test_resnet_rs/assets/original_outputs/"
"resnetrs152_i192_original_logits_ema.npy",
),
},
{
Expand All @@ -61,7 +65,8 @@
"weights_path": os.path.join(ROOT_DIR, "weights/resnet-rs-152-i224.h5"),
"original_outputs": os.path.join(
ROOT_DIR,
"tests/assets/original_outputs/resnetrs152_i224_original_logits_ema.npy",
"test_resnet_rs/assets/original_outputs/"
"resnetrs152_i224_original_logits_ema.npy",
),
},
{
Expand All @@ -70,7 +75,8 @@
"weights_path": os.path.join(ROOT_DIR, "weights/resnet-rs-152-i256.h5"),
"original_outputs": os.path.join(
ROOT_DIR,
"tests/assets/original_outputs/resnetrs152_i256_original_logits_ema.npy",
"test_resnet_rs/assets/original_outputs/"
"resnetrs152_i256_original_logits_ema.npy",
),
},
{
Expand All @@ -79,7 +85,8 @@
"weights_path": os.path.join(ROOT_DIR, "weights/resnet-rs-200-i256.h5"),
"original_outputs": os.path.join(
ROOT_DIR,
"tests/assets/original_outputs/resnetrs200_i256_original_logits_ema.npy",
"test_resnet_rs/assets/original_outputs/"
"resnetrs200_i256_original_logits_ema.npy",
),
},
{
Expand All @@ -88,7 +95,8 @@
"weights_path": os.path.join(ROOT_DIR, "weights/resnet-rs-270-i256.h5"),
"original_outputs": os.path.join(
ROOT_DIR,
"tests/assets/original_outputs/resnetrs270_i256_original_logits_ema.npy",
"test_resnet_rs/assets/original_outputs/"
"resnetrs270_i256_original_logits_ema.npy",
),
},
{
Expand All @@ -97,7 +105,8 @@
"weights_path": os.path.join(ROOT_DIR, "weights/resnet-rs-350-i256.h5"),
"original_outputs": os.path.join(
ROOT_DIR,
"tests/assets/original_outputs/resnetrs350_i256_original_logits_ema.npy",
"test_resnet_rs/assets/original_outputs/"
"resnetrs350_i256_original_logits_ema.npy",
),
},
{
Expand All @@ -106,7 +115,8 @@
"weights_path": os.path.join(ROOT_DIR, "weights/resnet-rs-350-i320.h5"),
"original_outputs": os.path.join(
ROOT_DIR,
"tests/assets/original_outputs/resnetrs350_i320_original_logits_ema.npy",
"test_resnet_rs/assets/original_outputs/"
"resnetrs350_i320_original_logits_ema.npy",
),
},
{
Expand All @@ -115,7 +125,8 @@
"weights_path": os.path.join(ROOT_DIR, "weights/resnet-rs-420-i320.h5"),
"original_outputs": os.path.join(
ROOT_DIR,
"tests/assets/original_outputs/resnetrs420_i320_original_logits_ema.npy",
"test_resnet_rs/assets/original_outputs/"
"resnetrs420_i320_original_logits_ema.npy",
),
},
]
Expand Down Expand Up @@ -180,7 +191,7 @@


class TestLocalOutputConsistency(parameterized.TestCase):
IMAGE_PATH = os.path.join(ROOT_DIR, "tests/assets/panda.jpg")
IMAGE_PATH = os.path.join(ROOT_DIR, "test_resnet_rs/assets/panda.jpg")
INPUT_SHAPE = (224, 224)
CROP_PADDING = 32
MEAN_RGB = [0.485 * 255, 0.456 * 255, 0.406 * 255]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from setuptools import setup

TF_MIN_VERSION = 2.2
TF_MAX_VERSION = 2.6
TF_MAX_VERSION = 2.7

with open("README.md", encoding="utf-8") as f:
long_description = "\n" + f.read()
Expand Down
File renamed without changes
File renamed without changes.
File renamed without changes.

0 comments on commit e82c0c3

Please sign in to comment.