Basically the title. PyTorch and Tensorflow both support cross entropy in the ND case, and your implementation in Numpy would work for the multi-dimensional case too. However, in every function, there is an assert that the logits are 2D array. I propose to remove those asserts :smile:
I ran into this problem while using the latest version of https://github.com/bethgelab/foolbox, which uses eagerpy. I would also benefit from support for cross-entropy against more than two dimensions.
First, congrats on such a great project!
Basically the title. PyTorch and Tensorflow both support cross entropy in the ND case, and your implementation in Numpy would work for the multi-dimensional case too. However, in every function, there is an assert that the logits are 2D array. I propose to remove those asserts :smile: