변환한 모델 실행하는데 에러가 발생

정확하게는 모델을 불러오다 죽는게 아닌가 싶어서 해당 파일을 열어봄

$ ./label_image -i 2012060407491899196_l.jpg -l label -m go.tflite 
Loaded model go.tflite
resolved reporter
ERROR: tensorflow/lite/core/subgraph.cc BytesRequired number of elements overflowed.

세그멘테이션 오류 (core dumped)

 

음.. 593 라인 에러라는데

 

 563 namespace {
 564 // Multiply two sizes and return true if overflow occurred;
 565 // This is based off tensorflow/overflow.h but is simpler as we already
 566 // have unsigned numbers. It is also generalized to work where sizeof(size_t)
 567 // is not 8. 
 568 TfLiteStatus MultiplyAndCheckOverflow(size_t a, size_t b, size_t* product) {
 569   // Multiplying a * b where a and b are size_t cannot result in overflow in a
 570   // size_t accumulator if both numbers have no non-zero bits in their upper
 571   // half.
 572   constexpr size_t size_t_bits = 8 * sizeof(size_t);
 573   constexpr size_t overflow_upper_half_bit_position = size_t_bits / 2;
 574   *product = a * b;
 575   // If neither integers have non-zero bits past 32 bits can't overflow.
 576   // Otherwise check using slow devision.
 577   if (TFLITE_EXPECT_FALSE((a | b) >> overflow_upper_half_bit_position != 0)) {
 578     if (a != 0 && *product / a != b) return kTfLiteError;
 579   }
 580   return kTfLiteOk;
 581 }  
 582 }  // namespace
 583 
 584 TfLiteStatus Subgraph::BytesRequired(TfLiteType type, const int* dims,
 585                                      size_t dims_size, size_t* bytes) {
 586   TF_LITE_ENSURE(&context_, bytes != nullptr);
 587   size_t count = 1;
 588   for (int k = 0; k < dims_size; k++) {
 589     size_t old_count = count;
 590     TF_LITE_ENSURE_MSG(
 591         &context_,
 592         MultiplyAndCheckOverflow(old_count, dims[k], &count) == kTfLiteOk,
 593         "BytesRequired number of elements overflowed.\n");
 594   }
 595   size_t type_size = 0;
 596   TF_LITE_ENSURE_OK(&context_, GetSizeOfType(&context_, type, &type_size));
 597   TF_LITE_ENSURE_MSG(
 598       &context_, MultiplyAndCheckOverflow(type_size, count, bytes) == kTfLiteOk,
 599       "BytesRequired number of bytes overflowed.\n");
 600   return kTfLiteOk;
 601 }

'프로그램 사용 > yolo_tensorflow' 카테고리의 다른 글

tensorflow bazel build  (0) 2021.02.01
convert from tensorflow to tensorflow lite  (0) 2021.02.01
tensorflowlite build  (0) 2021.01.28
pb to tflite 변환 part 2...  (0) 2021.01.27
tensorflow netron  (0) 2021.01.27
Posted by 구차니
이론 관련/전기 전자2021. 1. 29. 11:13

아래에서 설명은 들어도 dBFS가 어떤 의미로 쓰이고 이 값이 멀 의미하는지 모르겠다.

dBFS는 디지탈 오디오 신호에 특히 더 중요하게 사용되는 개념입니다. 디지탈 오디오에서 신호는 숫자로 변환되고 다시 그 숫자가 실제의 아날로그 신호로 바뀝니다. 쉽게 생각해서 1부터 10까지 표현할 수 있는 디지털 오디오 시스템은 11보다 큰 크기의 아날로그 신호를 녹음할 수도 재생할 수도 없습니다. 자릿수를 넘어가면서 즉시 복구될 수 없는 클립핑이 생기는 것입니다. 

[링크 : http://audio-probe.com/documentation/db란-무엇인가/]

'이론 관련 > 전기 전자' 카테고리의 다른 글

Hall effect sensor  (0) 2021.06.22
emc2301 fan controller  (0) 2021.06.11
FFT와 고조파(harmonic)  (0) 2020.10.05
Audio Induction Loop  (0) 2020.09.21
quadrature sampling(I/Q signal)  (0) 2020.09.06
Posted by 구차니