模型推理输入bin文件准备
操作示例如下。
mindstudio@ubuntu:~/ResNet50_for_TensorFlow_1.7_model/pb$ python3 Python 3.9.5 (default, Apr 7 2022, 14:40:47) [GCC 7.5.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import numpy as np >>> input_data=np.random.random((1,224,224,3)).astype(np.float32) >>> input_data.tofile("test.bin") >>>
执行如上命令会在当前目录下生成作为模型推理输入的test.bin文件。
父主题: 精度比对(推理)