def build_graph(self) -> None: conv_edge1 = MutableEdge((BatchNorm(), PointConv2D( (20, 40)), DepthwiseConv2D(), IdentityOperation(), SeparableConv2D( (20, 40)), Dropout(0.25), ReLU()), max_vertices=10, initialize_with_identity=False) conv_edge2 = conv_edge1.deep_copy() vertex1 = Vertex(name='V1') vertex2 = Vertex(name='V2') self.input_vertex.add_edge(conv_edge1, vertex1) vertex7 = Vertex(name='V7') vertex1.add_edge(MaxPool2D(), vertex7) vertex7.add_edge(conv_edge2, vertex2) vertex3 = Vertex(name='V3') vertex2.add_edge(Flatten(), vertex3) vertex4 = Vertex(name='V4') vertex3.add_edge(Dense(512), vertex4) vertex5 = Vertex(name='V5') vertex4.add_edge(ReLU(), vertex5) vertex6 = Vertex(name='V6') vertex5.add_edge(Dropout(0.5), vertex6) vertex6.add_edge(Dense(num_classes), self.output_vertex)
def build_graph(self) -> None: vertex = Vertex() edge1 = MaxPool2D() edge2 = IdentityOperation() self.input_vertex.add_edge(edge1, vertex) vertex.add_edge(edge2, self.output_vertex)