Routine to representational layer type based on actual layer type and opcode
| 741 | |
| 742 | // Routine to representational layer type based on actual layer type and opcode |
| 743 | string generateGraphLayerType(const string& layerType, int opcode) |
| 744 | { |
| 745 | string graphLayerType = ""; |
| 746 | if(layerType == "Convolution") { |
| 747 | switch (opcode) { |
| 748 | case 10: graphLayerType = "BN [+ Scale]"; break; |
| 749 | case 11: graphLayerType = "Eltwise"; break; |
| 750 | case 12: graphLayerType = "BN + Conv"; break; |
| 751 | case 18: graphLayerType = "CReLU"; break; |
| 752 | case 19: graphLayerType = "3DS-Conv + Conv"; break; |
| 753 | default: graphLayerType = "Convolution"; break; |
| 754 | } |
| 755 | } |
| 756 | else if(layerType == "Pooling") { |
| 757 | graphLayerType = opcode == 40 ? graphLayerType = "3DS-Conv" : "Pooling"; |
| 758 | } |
| 759 | else { |
| 760 | graphLayerType = layerType; |
| 761 | } |
| 762 | |
| 763 | return graphLayerType; |
| 764 | } |
| 765 | |
| 766 | |
| 767 | void XGraph::drawGraph(const string& filename, const string& rankdir) |