maxframe.tensor.random.standard_exponential# maxframe.tensor.random.standard_exponential(size=None, chunk_size=None, gpu=None, dtype=None)[源代码]# 从标准指数分布中抽取样本。 standard_exponential 与尺度参数为 1 的指数分布相同。 参数: size (int or tuple of ints, optional) -- 输出形状。如果给定的形状是,例如 (m, n, k),则抽取 m * n * k 个样本。默认为 None,此时返回单个值。 chunk_size (int or tuple of int or tuple of ints, optional) -- 每个维度上的期望块大小 gpu (bool, optional) -- 如果为 True,则在 GPU 上分配张量,默认为 False dtype (data-type, optional) -- 返回张量的数据类型。 返回: out -- 抽取的样本。 返回类型: float or Tensor 示例 输出一个 3x8000 的张量: >>> import maxframe.tensor as mt >>> n = mt.random.standard_exponential((3, 8000))