You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I take the lstm_electricity_consumption.cpp example and modify it like
diff --git a/ml/test.cpp b/ml/test.cpp
index f7ce54b..53e2255 100644
--- a/ml/test.cpp+++ b/ml/test.cpp@@ -208,12 +208,12 @@ int main()
// Create test sets for one-step-ahead regression.
CreateTimeSeriesData(testData, testX, testY, rho);
+ // RNN regression model.+ RNN<MeanSquaredError, HeInitialization> model(rho);+
// Only train the model if required.
if (bTrain || bLoadAndTrain)
{
- // RNN regression model.- RNN<MeanSquaredError, HeInitialization> model(rho);-
if (bLoadAndTrain)
{
// The model will be trained further.
@@ -263,9 +263,6 @@ int main()
EarlyStopAtMinLoss());
cout << "Finished training." << endl;
- cout << "Saving Model" << endl;- data::Save(modelFile, "LSTMUnivar", model);- cout << "Model saved in " << modelFile << endl;
}
// NOTE: the code below is added in order to show how in a real application
@@ -275,9 +272,7 @@ int main()
// before. In your own application you may of course load any dataset.
// Load RNN model and use it for prediction.
- RNN<MeanSquaredError, HeInitialization> modelP(rho);- cout << "Loading model ..." << endl;- data::Load(modelFile, "LSTMUnivar", modelP);+ auto modelP = model;
arma::cube predOutP;
// Get predictions on the test data points.
then the program crashes with
Finished training...........................................................................................] 6% - ETA: 0s - loss: 0.00364827
terminate called after throwing an instance of 'std::logic_error'
what(): arma::memory::acquire(): requested size is too large
Aborted (core dumped)
The text was updated successfully, but these errors were encountered:
If I take the
lstm_electricity_consumption.cpp
example and modify it likethen the program crashes with
The text was updated successfully, but these errors were encountered: