Preparing .npy Data of a TensorFlow Model
Procedure
- Go to the directory where the .pb file is stored.
- Create the dump script file tools_tensorflow_dump.py (code reference).
- Dump data.Specify the .pb file, input .bin file for model inference, and input node name.
python3 tools_tensorflow_dump.py resnet50_tensorflow_1.7.pb -i test.bin -n 'Placeholder:0' -s [1,224,224,3] -a
- For details about the parameters, see Parameter Description.
- For details about how to prepare the input .bin file for model inference, see Preparation of the Input .bin File for Model Inference.
- Generate the result.
The following figure shows the generated .npy file.

Parent topic: Comparison Data Preparation