Hi there,
How could I go through the module and print its tensor size?
For example, I want to do the following thing:
void print_op_input(torch::jit::module & mod){
auto fwd_mtd = mod.get_method("forward");
for (torch::jit::Node * nd : fwd_method.graph()->nodes()){
if (nd->kind().is_aten()){
auto inputs = nd->inputs();
// Question : How to access the input?
// The inputs here are type intArrayRef<Value *>
}
}
}
The question is , how could I access the input? It is Value*
, not IValue
. How could I access its true stored value?