update cli.md for export ncnn model (#3846)

This commit is contained in:
nihui
2023-07-21 07:19:39 +08:00
committed by GitHub
parent 796bac229e
commit cf3c740fe7
4 changed files with 11 additions and 10 deletions

View File

@ -264,7 +264,7 @@ class AutoBackend(nn.Module):
metadata = w.parents[1] / 'metadata.yaml'
elif ncnn: # ncnn
LOGGER.info(f'Loading {w} for ncnn inference...')
check_requirements('git+https://github.com/Tencent/ncnn.git' if ARM64 else 'ncnn') # requires NCNN
check_requirements('git+https://github.com/Tencent/ncnn.git' if ARM64 else 'ncnn') # requires ncnn
import ncnn as pyncnn
net = pyncnn.Net()
net.opt.num_threads = os.cpu_count()