Closed MondayZhou closed 3 years ago
https://github.com/MegEngine/Models/blob/11013f6b3b252df71098b27714e39d9802d2520d/official/vision/classification/shufflenet/inference.py#L63
There is one line of missing code for transforming ndarray into tensor. It will lead to an error: 该码下遗漏了一行将ndarray转换成tensor的代码,导致在运行的时候报错:
TypeError: op Convolution expect type Tensor as inputs, got numpy.ndarray actually
Adding these below L63: L63下面应添加:
processed_img = megengine.tensor(processed_img, dtype="float32")
@MondayZhou 如果可能的话, 帮忙提一个PR
https://github.com/MegEngine/Models/blob/11013f6b3b252df71098b27714e39d9802d2520d/official/vision/classification/shufflenet/inference.py#L63
Missing Code
There is one line of missing code for transforming ndarray into tensor. It will lead to an error: 该码下遗漏了一行将ndarray转换成tensor的代码,导致在运行的时候报错:
Solution
Adding these below L63: L63下面应添加: