- This code made it easy to retrieve the data set before entering the dataloader of the pytorch model.
- It is a code that extracts the intermediate feature of the pytorch model.
- You can select the type of layer you want. For instance, If you want to extract the intermediate feature after the relu activation, modify as follows.
if isinstance(layer,nn.ReLU) :
layer.register_forward_hook(self.get_activation(idx))
self.names[idx] = layer
idx += 1
- It's a code for drawing figures easily using matplotlib. You will draw a dot-line as shown in the following picture.
- You can enter data in the text file, and for more information on how to operate, see the code line of
Dod_data class
and directory /data, then you can understand how to use. - Enter the data and run it as follows.
python dod_line_subgraph.py
- If
--common_legend True
, then it will creates subgraphs with common legned as follows.
- If
--common_legend False
, then it will creates subgraph wihh normal legend as follows.