Thank you for your response. i was able to get the values using  attr  but I still could not understand how to extract values from  slot_iterator_impl.
If its not too much trouble, can I please request sample code to extract for the same example (reproduced below)? It can help me better understand the codebase!
Thank you again!
#include <torch/script.h>

#include <iostream>
#include <memory>

int main(int argc, const char *argv[]) {
  torch::jit::script::Module container = torch::jit::load("container.pt");

  // Load values by name
  torch::Tensor a = container.get_attribute("a").toTensor();
  std::cout << a << "\n";

  torch::Tensor b = container.get_attribute("b").toTensor();
  std::cout << b << "\n";

  std::string c = container.get_attribute("c").toStringRef();
  std::cout << c << "\n";

  int64_t d = container.get_attribute("d").toInt();
  std::cout << d << "\n";

  return 0;
}