I want to test my neural network.
For example, given: an input tensor input
, a nn.module
with some submodules module
, an output tensor output
,
I want to find which indices of input
effected the index (1,2) of output
More specifically, given:
- Two input matrix of size (12, 12),
- Operation is
matmul
- Queried index of the output matrix is: (0,0)
the expected output is:
InputMatrix1: (0,0), (0, 1), ..., (0, 11)
InputMatrix2: (0,0), (1, 0), ..., (11, 0)
Maybe visualization is okay.
Is there any method or libraries that can achieve this?