diff --git a/include/utils.h b/include/utils.h index 7114481..dabf2de 100644 --- a/include/utils.h +++ b/include/utils.h @@ -11,7 +11,7 @@ namespace dlframework{ namespace dataset{ Tensor ** Read_MNIST_Train_Image(const char * url); //returns a pointer to a Tensor * array Tensor ** Read_MNIST_Train_Label(const char * url); - Tensor ** Read_MNIST_Test_Iamge(const char * url); + Tensor ** Read_MNIST_Test_Image(const char * url); Tensor ** Read_MNIST_Test_Label(const char * url); Tensor ** _read_mnist_image(const char * url, int len); diff --git a/include/variable.h b/include/variable.h index 2115e87..8bdfb5e 100644 --- a/include/variable.h +++ b/include/variable.h @@ -34,7 +34,7 @@ namespace dlframework{ Tensor operator-(const Tensor & b) const; Tensor & operator*=(const float & x); - void Reshape(const std::initializer_list & init_shape); + void reshape(const std::initializer_list & init_shape); friend std::ostream& operator<<(std::ostream & o, const Tensor & rhs); }; diff --git a/src/tensor.cpp b/src/tensor.cpp index f624a5f..691b5bd 100644 --- a/src/tensor.cpp +++ b/src/tensor.cpp @@ -29,7 +29,7 @@ namespace dlframework{ p=new float[length]; } -void TensorReshape(const std::initializer_list & init_shape){ +void Tensor::reshape(const std::initializer_list & init_shape){ dim = init_shape.end()-init_shape.begin(); unsigned i=0; int new_length=1; diff --git a/src/utils.cpp b/src/utils.cpp index 1c54408..1cf1c9a 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -58,7 +58,7 @@ Tensor ** Read_MNIST_Train_Image(const char * url) //returns a pointer to a Tens return _read_mnist_image(url, 60000); } -Tensor ** Read_MNIST_Test_Iamge(const char * url) +Tensor ** Read_MNIST_Test_Image(const char * url) { return _read_mnist_image(url, 10000); }