Skip to content

Commit

Permalink
[ci] use cat as default input
Browse files Browse the repository at this point in the history
  • Loading branch information
wuhanstudio committed Oct 26, 2021
1 parent c1e3dfa commit 8ce6a13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_simba.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ class TestSimBA(unittest.TestCase):

def test_simba(self):
# Load Image [0.0, 1.0]
x = np.asarray(Image.open("tests/dog.jpg").resize((32, 32))) / 255.0
x = np.asarray(Image.open("tests/cat.jpg").resize((32, 32))) / 255.0

# Initialize API Model
model = VGG16Cifar10("https://api.wuhanstudio.uk" + "/vgg16_cifar10")

# Get Preditction
y_pred = model.predict(np.array([x]))[0]

assert (np.argmax(y_pred) == 5)
assert (np.argmax(y_pred) == 3)

# SimBA Attack
simba = SimBA(model)
Expand Down

0 comments on commit 8ce6a13

Please sign in to comment.