Init the instance
(self)
| 1975 | self.is_graph = False |
| 1976 | |
| 1977 | def initialize(self): |
| 1978 | """ |
| 1979 | Init the instance |
| 1980 | """ |
| 1981 | self.outputs_info = {outp.name: outp for outp in self.outputs} |
| 1982 | _layers = [] # layers by topo order |
| 1983 | for node, operator in self.layers: |
| 1984 | _del_keys = [] |
| 1985 | for key, name in node.weight_inputs.items(): |
| 1986 | if key not in self.states: |
| 1987 | # cannot find the weights, try to find it from input |
| 1988 | node.set_attr_inputs(key, name) |
| 1989 | _del_keys.append(key) |
| 1990 | for key in _del_keys: |
| 1991 | node.del_weight_inputs(key) |
| 1992 | self.__dict__[node.name] = operator |
| 1993 | _layers.append(node) |
| 1994 | self._layers = _layers |
| 1995 | |
| 1996 | def init_tensor_count(self): |
| 1997 | """ |
no test coverage detected