Adversarial-Deep-Learning / code-soup

This is a collection of algorithms and approaches used in the book adversarial deep learning
MIT License
18 stars 18 forks source link

Refactoring #70

Open someshsingh22 opened 3 years ago

someshsingh22 commented 3 years ago

Some tweaks and design changes

@mehulrastogi can you recall anything else?

mehulrastogi commented 3 years ago

@someshsingh22 what do you mean by removing step analogy?

someshsingh22 commented 3 years ago

@mehulrastogi Step analogy is good for iterative attacks, but for training normal modules like ResNet / NiN / AllConvNet it looks unnecessary. So we should use the torchvision's pattern for them

mehulrastogi commented 3 years ago
.code-soup/code_soup/
+-- common/ #Used across the package, parallel to glossary
|   |   +-- models/ #Commonly used models for eg GPT-2
|   |     +-- vision/
|   |     +-- text/ 
|   |     +-- rl/
|   |   +-- utils/ #Commonly used utils like accuracy metric etc
|   |   +-- dataset/ #Datasets used in the chapter
# For every chapter ->
+-- ch{Chapter_Number}/ #Code refering to a particular chapter
|   +-- attacks/ #Attackers or Defenders used in the chapter
|   |   +--{Name_of_Attack/Defense}.py
# There will be exactly one file pertaining to the agents.
# This is supposed to be parallel to the pseudcode in a book.
# Therefore only model states and step functions for attack/defense should be here

How is the above struc?

mehulrastogi commented 3 years ago

With my PR I majorly did some reorganization on the commons folder to package files together logically

The following tasks still need attention:-