nightmare.c

This commit is contained in:
Mohd. Saad Khan 2023-07-03 03:54:26 +05:30 committed by GitHub
parent f6afaabcdf
commit c5e732626d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,7 @@ float abs_mean(float *x, int n)
sum += fabs(x[i]);
}
return sum/n;
}
void calculate_loss(float *output, float *delta, int n, float thresh)
@ -91,16 +92,6 @@ void optimize_picture(network *net, image orig, int max_layer, float scale, floa
if(norm) normalize_array(out.data, out.w*out.h*out.c);
axpy_cpu(orig.w*orig.h*orig.c, rate, out.data, 1, orig.data, 1);
/*
normalize_array(orig.data, orig.w*orig.h*orig.c);
scale_image(orig, sqrt(var));
translate_image(orig, mean);
*/
//translate_image(orig, 1);
//scale_image(orig, .5);
//normalize_image(orig);
constrain_image(orig);
free_image(crop);