diff --git a/src/sgd.cu b/src/sgd.cu index d46ece86..f864e6db 100644 --- a/src/sgd.cu +++ b/src/sgd.cu @@ -1,3 +1,4 @@ +#include #include #include #include "sgd.h" @@ -32,7 +33,8 @@ void SGD::Run() Tensor xt({(int)maxBatchSize_, (int)numExamples}, 0.0f); Tensor yt({(int)maxBatchSize_, (int)numClasses_}, 0.0f); - vector shuffle = CreateShuffle(numExamples); + //vector shuffle = CreateShuffle(numExamples); + vector shuffle; for (size_t numEpoch = 0; numEpoch < epochs_; ++numEpoch) { std::cerr << "Starting epoch #" << numEpoch << std::endl; diff --git a/src/sgd.h b/src/sgd.h index c5ea8dbc..33364049 100644 --- a/src/sgd.h +++ b/src/sgd.h @@ -20,9 +20,9 @@ class SGD { void Run(); private: - std::shared_ptr cost_function_; - std::shared_ptr inX_; - std::shared_ptr inY_; + Expr *cost_function_; + Expr *inX_; + Expr *inY_; std::vector params_; const float eta_; std::vector& xData_;