code: def update_hash(self):
          
          _logger.debug('update hash')
          layer_in_cnt = [len(layer.input) for layer in self.layers]
          topo_queue = deque([i for i, layer in enumerate(self.layers) if not layer.is_delete and layer.graph_type == LayerType.input.value])
          while topo_queue:
              layer_i = topo_queue.pop()
              self.layers[layer_i].update_hash(self.layers)
              for layer_j in self.layers[layer_i].output:
                  layer_in_cnt[layer_j] -= 1
                  if layer_in_cnt[layer_j] == 0:
                      topo_queue.appendleft(layer_j)
docs: update hash id of each layer, in topological order/recursively
          hash id will be used in weight sharing