위 링크의 예제를 실행하는 중인데.
예제가 3개월 전이어서 그런지
model_quantized = quantize(model, ranges, with_quantize=False)
위 명령문에서 with_quantize 라는 전달인자는 없어진 것 같습니다.
help(quantize) 에서 확인했습니다.
그리고 순서에 따라 다 따라했는데
InvalidInput: Invalid input tensors 오류가 발생합니다.
재부팅도 몇 번이고 했지만 처음에 제대로 되는 것 처럼 진행되다가
위의 오류를 발생 시킵니다.
아래는 출력 내용입니다.
2023-10-12T09:25:37.627607Z INFO furiosa_rt_core::driver::event_driven::coord: FuriosaRT (v0.10.1, rev: e710d5f8c, built at: 2023-09-22T00:49:24Z) bootstrapping ...
2023-10-12T09:25:37.632500Z INFO furiosa_rt_core::driver::event_driven::coord: Found furiosa-compiler (v0.10.0, rev: f8f05c8, built at: 2023-08-08T11:58:09Z)
2023-10-12T09:25:37.632516Z INFO furiosa_rt_core::driver::event_driven::coord: Found libhal (type: warboy, v0.11.0, rev: 43c901f built at: 2023-08-08T12:07:35Z)
2023-10-12T09:25:37.632524Z INFO furiosa_rt_core::driver::event_driven::coord: [Runtime-0] detected 1 NPU device(s):
2023-10-12T09:25:37.637812Z INFO furiosa_rt_core::driver::event_driven::coord: - [0] npu:0:0-1 (warboy-b0-2pe, 128dpes, firmware: 1.7.2, e1c4288)
2023-10-12T09:25:37.638377Z INFO furiosa_rt_core::driver::event_driven::coord: [Runtime-0] started
2023-10-12T09:25:43.778055Z INFO furiosa::runtime: Saving the compilation log into /home/nobleteam/.local/state/furiosa/logs/compiler-20231012182543-ngxcr7.log
2023-10-12T09:25:43.779059Z INFO furiosa_rt_core::driver::event_driven::coord: [Runtime-0] created Sess-2ebcf2d1 using npu:0:0-1
2023-10-12T09:25:43.797906Z INFO furiosa_rt_core::driver::event_driven::coord: [Sess-2ebcf2d1] compiling the model (target: warboy-b0-2pe, 128dpes, size: 216.8 MB)
2023-10-12T09:25:46.525306Z INFO furiosa_rt_core::driver::event_driven::coord: [Sess-2ebcf2d1] the model compile is successful (took 2 secs)
2023-10-12T09:25:46.636733Z INFO furiosa_rt_core::driver::event_driven::coord: [Runtime-0] created 1 NPU threads on npu:0:0-1 (DRAM: 65.3 MiB/16.0 GiB, SRAM: 32.0 MiB/128.0 MiB)
2023-10-12T09:25:47.419611Z INFO furiosa_rt_core::driver::event_driven::coord: [Sess-2ebcf2d1] terminated
2023-10-12T09:25:47.427483Z INFO furiosa_rt_core::npu::raw: NPU (npu:0:0-1) has been closed
2023-10-12T09:25:47.429732Z INFO furiosa_rt_core::driver::event_driven::coord: [Runtime-0] stopped
---------------------------------------------------------------------------
InvalidInput Traceback (most recent call last)
Cell In[12], line 7
5 inputs = [preproc(cv2.imread(image), (640, 640))[0][np.newaxis, ...]]
6 start = time.perf_counter_ns()
----> 7 outputs = session.run(inputs)
8 elapsed_time += time.perf_counter_ns() - start
9 total_predictions += 1
InvalidInput: Invalid input tensors
혹시 제가 뭔가를 빠트린 거나 잘못 이해한 게 있나요?
HxWxC, CxHxW, 1xCxHxW 정도는 아는데
def preproc 에서 최적화 적용하기 전(15,16라인 주석처리전)에는
정상적으로 나오는 것을 확인했습니다.
아래는
model_quantized = quantize(model, ranges, with_quantize=False)
위 명령문에서 with_quantize 라는 전달인자는 없어진 것 같습니다.
help(quantize) 에서 확인했습니다.