is there a way to deactivate some TracerWarnings for when I know the input size will not change?
My code is written such that it work with variable input sizes, but actually a single run always uses constant sized input. I do not want to switch to TorchScript because distributions are not properly supported and also because I do not need the functionality, since my inputs are actually constant.
For example the following gives me a warning:
all(s == x.shape for s in x.shape) TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
I know why the warning makes sense, however I am wondering whether I can deactivate it since I know that in a single run the condition will be constant.