类方法,根据torch.Tensor输入的shape、dtype和format构造mindietorch.Input。
def get_input_from_tensor(cls, input_tensor: torch.Tensor) -> "Input"
参数名 |
参数类型 |
输入/输出 |
说明 |
---|---|---|---|
input_tensor |
torch.Tensor |
输入 |
用于参考的torch.Tensor输入。 |
mindietorch.Input类型,根据输入torch.Tensor的shape、dtype和format构造的mindietorch.Input对象。