jax.ShapeDtypeStruct#

class jax.ShapeDtypeStruct(shape, dtype, *, sharding=None, weak_type=False)[源代码]#

一个包含数组的形状、dtype 和其他静态属性的容器。

ShapeDtypeStruct 经常与 jax.eval_shape() 一起使用。

参数:
  • shape – 表示数组形状的整数序列

  • dtype – 一个类似 dtype 的对象

  • sharding – (可选) 一个 jax.Sharding 对象

__init__(shape, dtype, *, sharding=None, weak_type=False)[源代码]#

方法

__init__(shape, dtype, *[, sharding, weak_type])

属性

shape

dtype

sharding

weak_type

layout

ndim

size