twosixlabs / armory-example

Example external repository for interacting with armory.
MIT License
11 stars 11 forks source link

Shape Not Matching Error When Running official_scenario_configs/ucf101_baseline_pretrained.json #69

Closed superctj closed 3 years ago

superctj commented 4 years ago

Hi, I tried to run the config mentioned above but encountered a shape-mismatch error during the evaluation. Do you have any suggestions to fix this issue? A screenshot is attached here for reference Screen Shot 2020-11-02 at 5 04 35 PM

AngusG commented 4 years ago

Ditto with resisc45_baseline_densenet121_adversarial.json:

ValueError: Error when checking input: expected input_1 to have shape (256, 256, 3) but got array with shape (224, 224, 3)

I came across this after training and evaluating my own model on the RESIC45 clean sets in armory worked fine, but then failed upon evaluating the adversarial_univpatch with

TypeError: The data type of input data x is uint8 and cannot represent negative values. Consider changing the data type of the input data x to a type that supports negative values e.g. np.float32.

It would be nice if all variants of a particular dataset have the same type, and/or to better document canonical preprocessing and data types of each set.

davidslater commented 4 years ago

@superctj, this issue was just fixed in master: https://github.com/twosixlabs/armory/issues/843 Details are there. Essentially, while the ucf101 dataset claims to have shape 240x320 for all video clips, four clips in the test set are shape 226x400. This will be fixed in the 0.12.2 release today.

@AngusG We will likely be removing the existing adversarial dataset configs (or at least adding a deprecation warning), as the adversarial datasets were not stored in the same format, type, and dimension as the original dataset. Essentially, they were tied to specific models, and broke once we moved to canonical preprocessing.

davidslater commented 3 years ago

Adversarial dataset configs have been removed from official scenario configs. UCF101 issue is fixed now.

70