| | |
| | | int crop_width = option_find_int(options, "crop_width",1); |
| | | int flip = option_find_int(options, "flip",0); |
| | | float angle = option_find_float(options, "angle",0); |
| | | float saturation = option_find_float(options, "saturation",1); |
| | | float exposure = option_find_float(options, "exposure",1); |
| | | |
| | | int batch,h,w,c; |
| | | h = params.h; |
| | |
| | | batch=params.batch; |
| | | if(!(h && w && c)) error("Layer before crop layer must output image."); |
| | | |
| | | crop_layer *layer = make_crop_layer(batch,h,w,c,crop_height,crop_width,flip, angle); |
| | | crop_layer *layer = make_crop_layer(batch,h,w,c,crop_height,crop_width,flip, angle, saturation, exposure); |
| | | option_unused(options); |
| | | return layer; |
| | | } |
| | |
| | | fread(&net->momentum, sizeof(float), 1, fp); |
| | | fread(&net->decay, sizeof(float), 1, fp); |
| | | fread(&net->seen, sizeof(int), 1, fp); |
| | | fprintf(stderr, "%f %f %f %d\n", net->learning_rate, net->momentum, net->decay, net->seen); |
| | | |
| | | int i; |
| | | for(i = 0; i < net->n && i < cutoff; ++i){ |