raulsenaferreira / PRDC_2021_SUT_module

System under test (SUT) module for run experiments for the paper "Benchmarking Safety Monitors for Image Classifiers with Machine Learning"
3 stars 1 forks source link

run_ND_experiments.py: NameError: name 'X' is not defined #3

Open Siyuluan opened 2 years ago

Siyuluan commented 2 years ago

We ran into an error shown below:

Traceback (most recent call last): File "/media/hd/Siyu_Luan_test/PRDC_2021_Data/PRDC_2021_SUT_module/run_experiments.py", line 176, in args.verbose, repetitions, dataset) File "/media/hd/Siyu_Luan_test/PRDC_2021_Data/PRDC_2021_SUT_module/src/threats/novelty_detection/run_ND_experiments.py", line 94, in start net = pytorch_classifiers.DNN(exp_params['num_classes_to_monitor_ID'], np.shape(X)[2], 1) NameError: name 'X' is not defined

raulsenaferreira commented 2 years ago

Hello, sorry for the late response. X is the image in numpy format. Just make sure to pass the image in this format that it will work. Regards

Siyuluan commented 2 years ago

Thank you so much! I will try it now! :)