Init the tensor count dict
(self)
| 1994 | self._layers = _layers |
| 1995 | |
| 1996 | def init_tensor_count(self): |
| 1997 | """ |
| 1998 | Init the tensor count dict |
| 1999 | """ |
| 2000 | self.tensor_count = {} |
| 2001 | for node, operator in self.layers: |
| 2002 | # init the tensor count |
| 2003 | all_possible_inputs = node.inputs + list( |
| 2004 | node.attr_inputs.keys()) + list(node.weight_inputs.keys()) |
| 2005 | for inp in all_possible_inputs: |
| 2006 | if inp not in self.tensor_count: |
| 2007 | self.tensor_count[inp] = 1 |
| 2008 | else: |
| 2009 | self.tensor_count[inp] += 1 |
| 2010 | |
| 2011 | def to_input_tensor(self, x): |
| 2012 | """ |