matrix.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:paysage 作者: drckf 项目源码 文件源码
def unsqueeze(tensor: T.Tensor, axis: int) -> T.Tensor:
    """
    Return tensor with a new axis inserted.

    Args:
        tensor: A tensor.
        axis: The desired axis.

    Returns:
        tensor: A tensor with the new axis inserted.

    """
    return torch.unsqueeze(tensor, axis)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号