weird int bug

This commit is contained in:
Joseph Redmon 2016-03-13 23:21:38 -07:00
parent d1965bdb96
commit 4b2a9d9569

View File

@ -871,8 +871,8 @@ void get_next_batch(data d, int n, int offset, float *X, float *y)
void smooth_data(data d) void smooth_data(data d)
{ {
int i, j; int i, j;
int scale = 1. / d.y.cols; float scale = 1. / d.y.cols;
int eps = .1; float eps = .1;
for(i = 0; i < d.y.rows; ++i){ for(i = 0; i < d.y.rows; ++i){
for(j = 0; j < d.y.cols; ++j){ for(j = 0; j < d.y.cols; ++j){
d.y.vals[i][j] = eps * scale + (1-eps) * d.y.vals[i][j]; d.y.vals[i][j] = eps * scale + (1-eps) * d.y.vals[i][j];