def get_input_from_tensor(cls, input_tensor: torch.Tensor) -> "Input"
函数功能
类方法,根据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对象。