0

Can someone please explain me how to do inner product of two tensors in python to get one dimensional array. For example, I have two tensors with size (6,6,6,6,6) and (6,6,6,6). I need an one dimensional array of size (6,1) or (1,6).

1 Answers1

0

Numpy has a function tensordot, check it out:
https://numpy.org/doc/stable/reference/generated/numpy.tensordot.html

Abhinav Mathur
  • 7,791
  • 3
  • 10
  • 24