Thanks very much for your kind reply.
After debugging, I found my problem is resulted from the fvcore.nn.flop_count.flop_count 3.
During the forward in above function, the type will be <class 'torch.Tensor'>