Fix ones and zeros bug.
This commit is contained in:
@@ -66,7 +66,7 @@ Matrix Aurora::ones(int aRow, int aColumn, int aSlice) {
|
||||
size_t arraySize = rowSize * colSize* sliceSize;
|
||||
float* data = malloc(arraySize);
|
||||
float one = 1.0;
|
||||
cblas_scopy(arraySize,&one,0,data,1.0f);
|
||||
cblas_scopy(arraySize,&one,0,data,1.0);
|
||||
return Matrix::New(data,rowSize,colSize,aSlice);
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ Matrix Aurora::zeros(int aRow, int aColumn, int aSlice) {
|
||||
size_t arraySize = rowSize * colSize* sliceSize;
|
||||
float* data = malloc(arraySize);
|
||||
float zero = 0.0;
|
||||
cblas_scopy(arraySize,&zero,0,data,0.0f);
|
||||
cblas_scopy(arraySize,&zero,0,data,1);
|
||||
return Matrix::New(data,rowSize,colSize,sliceSize);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user