I want to use the value of a tensor as key of a dictionary, which means same mapping for tensors of same value. You can check the following codes for details.
imp