You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
│ ├── base_model.py - this file contains the abstract class of the model.
115
-
│ └── base_train.py - this file contains the abstract class of the trainer.
115
+
│ └── base_train.py - this file contains the abstract class of the trainer.
116
116
│
117
117
│
118
-
├── model -This folder contains any model of your project.
118
+
├── model - this folder contains any model of your project.
119
119
│ └── example_model.py
120
120
│
121
121
│
122
-
├── trainer -this folder contains trainers of your project.
122
+
├── trainer -this folder contains trainers of your project.
123
123
│ └── example_trainer.py
124
124
│
125
-
├── mains - here's the main/s of your project (you may need more than one main.
125
+
├── mains - here's the main(s) of your project (you may need more than one main).
126
126
│
127
127
│
128
128
├── data _loader
129
-
│ └── data_generator.py - here's the data_generator that responsible for all data handling.
129
+
│ └── data_generator.py - here's the data_generator that is responsible for all data handling.
130
130
│
131
131
└── utils
132
132
├── logger.py
@@ -145,27 +145,27 @@ Folder structure
145
145
The base model contains:
146
146
-***Save*** -This function to save a checkpoint to the desk.
147
147
-***Load*** -This function to load a checkpoint from the desk.
148
-
-***Cur_epoch, Global_step counters*** -These variables to keep track of the curerent epoch and global step.
149
-
-***Init_Saver*** An abstract function to inialize the saver used for saving and loading the checkpoint, ***Note***: override this function in the model you want to implement.
148
+
-***Cur_epoch, Global_step counters*** -These variables to keep track of the current epoch and global step.
149
+
-***Init_Saver*** An abstract function to initialize the saver used for saving and loading the checkpoint, ***Note***: override this function in the model you want to implement.
150
150
-***Build_model*** Here's an abstract function to define the model, ***Note***: override this function in the model you want to implement.
151
151
-#### **Your model**
152
152
Here's where you implement your model.
153
153
So you should :
154
-
- Create your model class and Inherit the base_model class
154
+
- Create your model class and inherit the base_model class
155
155
- override "build_model" where you write the tensorflow model you want
156
156
- override "init_save" where you create a tensorflow saver to use it to save and load checkpoint
157
-
- call the "build_model" and "init_saver" in the initalizer.
157
+
- call the "build_model" and "init_saver" in the initializer.
158
158
159
159
### Trainer
160
160
--------------
161
161
-#### **Base trainer**
162
162
Base trainer is an abstract class that just wrap the training process.
163
163
-#### **Your trainer**
164
-
Here's what you shoulf implement in your trainer.
165
-
1. Create your trainer class and Inherit the base_trainer class.
164
+
Here's what you should implement in your trainer.
165
+
1. Create your trainer class and inherit the base_trainer class.
166
166
2. override these two functions "train_step", "train_epoch" where you implement the training process of each step and each epoch.
167
167
### Data Loader
168
-
These class is responsible for all data handling and processing and provide an easy interface that can be used by the trainer.
168
+
This class is responsible for all data handling and processing and provide an easy interface that can be used by the trainer.
169
169
### Logger
170
170
This class is responsible for the tensorboard summary, in your trainer create a dictionary of all tensorflow variables you want to summarize then pass this dictionary to logger.summarize().
0 commit comments