# Load tensorflow model
print('--> Loading model')
ret = rknn.load_onnx(model='./resnet100.onnx')
if ret != 0:
print('Load resnet100 failed! Ret = {}'.format(ret))
exit(ret)
print('done')
# Build model
print('--> Building model')
ret = rknn.build(do_quantization=True, dataset='./dataset.txt')
if ret != 0:
print('Build resnet100 failed!')
exit(ret)
print('done')
# Export rknn model
print('--> Export RKNN model')
ret = rknn.export_rknn('./resnet100.rknn')
if ret != 0:
print('Export mobilenet_v2.rknn failed!')
exit(ret)
print('done')