Skip to content

PyTorch 深度学习 验证码识别 #29

@boy-hack

Description

@boy-hack
  1. tensor 张量
    • 0阶 1阶 2阶
  2. tensor的方法
    • t1 = tensor([1,2])
    • t1.size()
    • t1.item()
    • t1.numpy() # 转python类型
    • t1.view(-1) # 转成一维向量
    • t1.dim() # 获取阶数
  3. tensor的切片
    • t2 = torch.rand(3,4,2) #三维
    • t2[1,:,:]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions