You could try flattening your tensor and then expanding it. The final shape of the tensor may not be what you’re looking for but depending on what you’re using it for you could try to work around that.