Esempio n. 1
0
    del get_masks_gen.X_deltaout_train, get_masks_gen.X_eval, get_masks_gen.Y_tf, get_masks_gen.Y_eval



print("STEP 2 : DONE")
print("---" * 100)
if args.end_after_step2:
    sys.exit(1)

#--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
print("STEP 3 : MAKE TABLE OF TRUTH")
print()
print("NEW DATA: "+ str(args.create_new_data_for_ToT) +  " | PURE ToT: " +  str(args.create_ToT_with_only_sample_from_cipher) )
print()

table_of_truth = ToT(args, nn_model_ref.net, path_save_model, rng, creator_data_binary, device, get_masks_gen.masks, nn_model_ref)
table_of_truth.create_DDT()

del table_of_truth.c0l_create_ToT, table_of_truth.c0r_create_ToT
del table_of_truth.c1l_create_ToT, table_of_truth.c1r_create_ToT

print("STEP 3 : DONE")
print("---" * 100)
#--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
print("STEP 4 : CREATE DATA PROBA AND CLASSIFY")
print()
print("NEW DATA: "+ str(args.create_new_data_for_classifier))
print()

generator_data = Genrator_data_prob_classifier(args, nn_model_ref.net, path_save_model, rng, creator_data_binary, device, get_masks_gen.masks, nn_model_ref)
generator_data.create_data_g(table_of_truth)
    del get_masks_gen.X_deltaout_train, get_masks_gen.X_eval, get_masks_gen.Y_tf, get_masks_gen.Y_eval



print("STEP 2 : DONE")
print("---" * 100)
if args.end_after_step2:
    sys.exit(1)

#--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
print("STEP 3 : MAKE TABLE OF TRUTH")
print()
print("NEW DATA: "+ str(args.create_new_data_for_ToT) +  " | PURE ToT: " +  str(args.create_ToT_with_only_sample_from_cipher) )
print()

table_of_truth = ToT(args, nn_model_ref.net, path_save_model, rng, creator_data_binary, device, get_masks_gen.masks, nn_model_ref)
table_of_truth.create_DDT()

del table_of_truth.c0l_create_ToT, table_of_truth.c0r_create_ToT
del table_of_truth.c1l_create_ToT, table_of_truth.c1r_create_ToT

print("STEP 3 : DONE")
print("---" * 100)
#--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
print("STEP 4 : CREATE DATA PROBA AND CLASSIFY")
print()
print("NEW DATA: "+ str(args.create_new_data_for_classifier))
print()

generator_data = Genrator_data_prob_classifier(args, nn_model_ref.net, path_save_model, rng, creator_data_binary, device, get_masks_gen.masks, nn_model_ref)
generator_data.create_data_g(table_of_truth)