Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

AttributeError: module 'tensorflow_hub' has no attribute 'Module' #3

Open
JimmyChan-cyber opened this issue Feb 13, 2025 · 2 comments

Comments

@JimmyChan-cyber
Copy link

When i run the code "python classification_attack.py --dataset_path data/mr --target_model bert --counter_fitting_cos_sim_path mat.txt --target_dataset mr --target_model_path BERT/mr --USE_cache_path " " --max_seq_length 256 --sim_score_window 40 --nclasses 2
", the ERROR comes out. It seems that tensorflow has changed. Could you please teach me how to replace this function? Thanks a lot.

@JimmyChan-cyber
Copy link
Author

Could you please tell me your tensorflow and tensorflow_hub version when you debug this code?

@RishabhMaheshwary
Copy link
Owner

Hi @JimmyChan-cyber, As the code is quite old, i suggest you to try running the attack from the TextAttack repository.
I have a fork with the hard label attack added here. The instructions to run are here. Let me know if you face any issues!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants