Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K
JAX  documentation - Home

jax.numpy.matvec

Contents

jax.numpy.matvec#

jax.numpy.matvec(x1,x2,/)[source]#

Batched matrix-vector product.

JAX implementation ofnumpy.matvec().

Parameters:
Returns:

An array of shape(...,M) containing the batched matrix-vector product.

Return type:

Array

See also

Examples

Simple matrix-vector product:

>>>x1=jnp.array([[1,2,3],...[4,5,6]])>>>x2=jnp.array([7,8,9])>>>jnp.matvec(x1,x2)Array([ 50, 122], dtype=int32)

Batched matrix-vector product:

>>>x2=jnp.array([[7,8,9],...[5,6,7]])>>>jnp.matvec(x1,x2)Array([[ 50, 122],       [ 38,  92]], dtype=int32)
Contents

[8]ページ先頭

©2009-2025 Movatter.jp