    inputs, outputs,
    tensor_manager->requestTensors(gnode, init_context.getTensorsSpec()));

  return outputs;
}

int NetworkGraph::initialize() {
  int status = ML_ERROR_NONE;
  /** this contains the map from name to input tensors for each node */
  std::unordered_map<std::string, std::vector<Var_Grad *>> input_map;

  /** check if the given config of node is of input node */
  auto is_input_node = [](const std::shared_ptr<LayerNode> &node) -> bool {
    return node->getInputConnections().empty();
  };