Hi, module of script is not dict.
Try pair.name

  
      github.com
  
  
    pytorch/pytorch/blob/v1.4.0/torch/csrc/jit/script/module.h#L51-L55 17

template <typename T>
struct Named {
  std::string name;
  T value;
};