Hi. I just started using PyTorch C++ fully. I set up a simple neural network that can evaluate a given tensor. When evaluating the neural network, the output (which I set to be a scalar, for only one input in this case) is shown as follows:

To test whether this output was a scalar Tensor (or a symbolic thing), I instead outputted this output plus a c++ float, and the result was then a correct scalar Tensor being shown with one number. Does anyone know why C++ by default shows the output in this format?

Hi @ptrblck, apologies for tagging you promptly here. Do you happen to know of this behavior or know someone who can help me understand this. Thank you.

Thank you. I see at the end of the function that it returns return std::make_tuple(scale, sz); a scale and a size in a tuple. This shouldn’t affect any arithmetic operations one would do with tensors, right?