Possible memory leak in 0-dimensional tensors

I experimented a bit regarding the CPU / GPU issue and generated a few minimal (onnx) examples with which I was able to reproduce strange behavior.

However, I will start a new thread for this because it doesn’t really match the original topic.
New thread at: Strange executions of some layers on the CPU instead of GPU