Update cnn_model.c

This commit is contained in:
Qiea
2024-11-12 15:39:08 +08:00
parent 8c9b256242
commit 9566fb0db7

View File

@@ -61,67 +61,67 @@ u8 modelmym_free(char* model_name){
if(conv1_bias.array != NULL && strcmp(model_name, "conv1_bias") == 0){
myfree(SRAMEX,conv1_bias.array);
conv1_bias.array = NULL;
conv1_bias.realength = NULL;
conv1_bias.realength = 0;
return 1;
}
else if(conv1_weight.array != NULL && strcmp(model_name, "conv1_weight") == 0){
myfree(SRAMEX,conv1_weight.array);
conv1_weight.array = NULL;
conv1_weight.realength = NULL;
conv1_weight.realength = 0;
return 1;
}
else if(conv2_bias.array != NULL && strcmp(model_name, "conv2_bias") == 0){
myfree(SRAMEX,conv2_bias.array);
conv2_bias.array = NULL;
conv2_bias.realength = NULL;
conv2_bias.realength = 0;
return 1;
}
else if(conv2_weight.array != NULL && strcmp(model_name, "conv2_weight") == 0){
myfree(SRAMEX,conv2_weight.array);
conv2_weight.array = NULL;
conv2_weight.realength = NULL;
conv2_weight.realength = 0;
return 1;
}
else if(conv3_bias.array != NULL && strcmp(model_name, "conv3_bias") == 0){
myfree(SRAMEX,conv3_bias.array);
conv3_bias.array = NULL;
conv3_bias.realength = NULL;
conv3_bias.realength = 0;
return 1;
}
else if(conv3_weight.array != NULL && strcmp(model_name, "conv3_weight") == 0){
myfree(SRAMEX,conv3_weight.array);
conv3_weight.array = NULL;
conv3_weight.realength = NULL;
conv3_weight.realength = 0;
return 1;
}
else if(fc1_bias.array != NULL && strcmp(model_name, "fc1_bias") == 0){
myfree(SRAMEX,fc1_bias.array);
fc1_bias.array = NULL;
fc1_bias.realength = NULL;
fc1_bias.realength = 0;
return 1;
}
else if(fc1_weight.array != NULL && strcmp(model_name, "fc1_weight") == 0){
myfree(SRAMEX,fc1_weight.array);
fc1_weight.array = NULL;
fc1_weight.realength = NULL;
fc1_weight.realength = 0;
return 1;
}
else if(fc2_bias.array != NULL && strcmp(model_name, "fc2_bias") == 0){
myfree(SRAMEX,fc2_bias.array);
fc2_bias.array = NULL;
fc2_bias.realength = NULL;
fc2_bias.realength = 0;
return 1;
}
else if(fc2_weight.array != NULL && strcmp(model_name, "fc2_weight") == 0){
myfree(SRAMEX,fc2_weight.array);
fc2_weight.array = NULL;
fc2_weight.realength = NULL;
fc2_weight.realength = 0;
return 1;
}
else if(data.array != NULL && strcmp(model_name, "data") == 0){
myfree(SRAMEX,data.array);
data.array = NULL;
data.realength = NULL;
data.realength = 0;
return 1;
}
else if(strcmp(model_name, "all") == 0){