For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo function
causal_conv1d_shape
def causal_conv1d_shape[dtype: DType, rank: Int](input: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=input.static_spec], weight: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=weight.static_spec], bias: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=bias.static_spec]) -> IndexList[rank]
Returns the output shape for the causal_conv1d op.
Causal 1D convolution preserves the input shape: output has the same
(batch, channels, seqlen) as input.
Parameters:
- βdtype (
DType): Element type of the input, weight, and bias tensors. - βrank (
Int): Tensor rank of the input and output, expected to be 3.
Args:
- βinput (
ManagedTensorSlice[IOSpec[_, _].Input, static_spec=input.static_spec]): Input tensor with shape(batch, channels, seqlen). - βweight (
ManagedTensorSlice[IOSpec[_, _].Input, static_spec=weight.static_spec]): Convolution weights with shape(channels, width). - βbias (
ManagedTensorSlice[IOSpec[_, _].Input, static_spec=bias.static_spec]): Per-channel bias with shape(channels,).
Returns:
IndexList[rank]: The output tensor shape, equal to input.shape().
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!