Stay organized with collections Save and categorize content based on your preferences.

Push an element onto the stack.

handle A Tensor of type resource. The handle to a stack.
elem A Tensor. The tensor to be pushed onto the stack.
swap_memory An optional bool. Defaults to False. Swap elem to CPU. Default to false.
name A name for the operation (optional).

A Tensor. Has the same type as elem.