def dump_layers_to_file(self, f):
        for node in self.nodes:
            if node.name in self.converted_nodes:
                continue

            # conv2d with dilation generates very complex nodes, so handle it in special
            if self.in_conv2d_scope(node.name):
                if node.op == 'Conv2D':
                    self.dump_complex_conv2d_to_file(node, f)
                continue

            if node.op == 'Conv2D':
                self.dump_simple_conv2d_to_file(node, f)
            elif node.op == 'DepthToSpace':
                self.dump_depth2space_to_file(node, f)
            elif node.op == 'MirrorPad':
                self.dump_mirrorpad_to_file(node, f)
            elif node.op == 'Maximum':
                self.dump_maximum_to_file(node, f)
            elif node.op == 'Sub':
                self.dump_mathbinary_to_file(node, f)
            elif node.op == 'Add':
                self.dump_mathbinary_to_file(node, f)
            elif node.op == 'Mul':
                self.dump_mathbinary_to_file(node, f)
            elif node.op == 'RealDiv':
                self.dump_mathbinary_to_file(node, f)