When data of the Tensor and Image classes is stored on the device, a core dump occurs when the GetData() API is called to return a pointer and print the data pointed by the pointer.
The address space on the device is independent of that on the host. The host cannot directly access the data on the device. For details, see the CANN Application Development Guide (C&C++).
Use Tensor.ToHost() or Image.ToHost() to transfer data of the Tensor or Image class from the device to the host, and then print the data again.