Closed ShotaArima closed 2 months ago
--------------------------------------------------------------------------- UnboundLocalError Traceback (most recent call last) /tmp/ipykernel_2869/4182338255.py in <module> 54 55 # Generate adversarial examples ---> 56 df_adv_lpf = gen_adv(config, 'LowProFool') 57 df_adv_df = gen_adv(config, 'Deepfool') 58 config['AdvData'] = {'LowProFool' : df_adv_lpf, 'Deepfool' : df_adv_df} /tmp/ipykernel_2869/1201834468.py in gen_adv(config, method) 9 # デバッグ 10 print("Feature names:", feature_names) ---> 11 print("Encoded bounds keys:", list(encoded_bounds.keys())) 12 print("Do feature names match encoded bounds?", set(feature_names) == set(encoded_bounds.keys())) 13 UnboundLocalError: local variable 'encoded_bounds' referenced before assignment
最初の症状