fix a bug of the fc op in the fp16 subgraph and add models to the entrance guard

This commit is contained in:
zengxianglong 2021-03-24 19:45:42 +08:00
parent 39623cf2dd
commit 7aeeed7e4d
2 changed files with 11 additions and 0 deletions

View File

@ -105,6 +105,9 @@ int LiteKernel::PreProcess() {
for (auto *output : this->out_tensors()) {
MS_ASSERT(output != nullptr);
if (desc_.data_type == kNumberTypeFloat16 && output->data_type() == kNumberTypeFloat32) {
output->set_data_type(kNumberTypeFloat16);
}
if (output->ElementsNum() >= MAX_MALLOC_SIZE / static_cast<int>(sizeof(int64_t))) {
MS_LOG(ERROR) << "The size of output tensor is too big";
return RET_ERROR;

View File

@ -149,3 +149,11 @@ scan_hms_detect_pb2tflite.tflite 1.5
ml_location.tflite 0.5
ml_face_openclose_tflite.tflite 0.5
ml_object_detect_pb2tflite.tflite 1.5
# lite-model_on_device_vision_classifier_landmarks_classifier* models' bias are caused by error accumulation and small
# output value
lite-model_on_device_vision_classifier_landmarks_classifier_africa_V1_1.tflite 10
lite-model_on_device_vision_classifier_landmarks_classifier_north_america_V1_1.tflite 18
lite-model_on_device_vision_classifier_landmarks_classifier_asia_V1_1.tflite 25
lite-model_on_device_vision_classifier_landmarks_classifier_oceania_antarctica_V1_1.tflite 10
lite-model_on_device_vision_classifier_landmarks_classifier_europe_V1_1.tflite 32
lite-model_on_device_vision_classifier_landmarks_classifier_south_america_V1_1.tflite 14