How to deploy a LSTM ModelCan we train a neural network to tell if an object is present or not in an Image?Multi-dimentional and multivariate Time-Series forecast (RNN/LSTM) KerasTest data predictions yield random results when making predictions from a saved modelHow to choose best model checkpoint when training deep learning model on all the data?How to reshape data for LSTM training in multivariate sequence predictionHow can I enrich train data in case of cnn using target and time featuresTraining a LSTM on a time serie containing multiple inputs for each timestepLSTM component dimensions and freedom of designError propagation in Time series forecast with many-to-many multi-steps RNN/LSTMHow to split a dataset into train and test sets for time series (multiple step-multiple output forecasting)?

Is there a way to make the "o" keypress of other-window <C-x><C-o> repeatable?

What security risks does exposing the size of the plaintext entail?

Do banks' profitability really suffer under low interest rates

Polar contour plot in Mathematica?

Did Wernher von Braun really have a "Saturn V painted as the V2"?

Why should P.I be willing to write strong LOR even if that means losing a undergraduate from his/her lab?

Why don't politicians push for fossil fuel reduction by pointing out their scarcity?

Playing a fast but quiet Alberti bass

what article (a/an) to use when there when there's a parenthesis following it?

Earliest evidence of objects intended for future archaeologists?

Is there a commercial liquid with refractive index greater than n=2?

Why is su world executable?

Will some rockets really collapse under their own weight?

Unsolved Problems due to Lack of Computational Power

Vegetarian dishes on Russian trains (European part)

Postdoc interview - somewhat positive reply but no news?

Does git delete empty folders?

Why is the name Bergson pronounced like Berksonne?

How could Tony Stark wield the Infinity Nano Gauntlet - at all?

Check disk usage of files returned with spaces

What allows us to use imaginary numbers?

Do living authors still get paid royalties for their old work?

Are unaudited server logs admissible in a court of law?

What's the point of writing that I know will never be used or read?



How to deploy a LSTM Model


Can we train a neural network to tell if an object is present or not in an Image?Multi-dimentional and multivariate Time-Series forecast (RNN/LSTM) KerasTest data predictions yield random results when making predictions from a saved modelHow to choose best model checkpoint when training deep learning model on all the data?How to reshape data for LSTM training in multivariate sequence predictionHow can I enrich train data in case of cnn using target and time featuresTraining a LSTM on a time serie containing multiple inputs for each timestepLSTM component dimensions and freedom of designError propagation in Time series forecast with many-to-many multi-steps RNN/LSTMHow to split a dataset into train and test sets for time series (multiple step-multiple output forecasting)?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2












$begingroup$


I have trained and validated my LSTM and I would like to deploy it.
So, I know that we can save and load the Sequential object of Keras (I am working with Keras as you can guess). I thus implemented a code using these functions.



But, I would like to know whether I must train my model with all the available data (training + test) or just on the training set as I did during my study.
Many tutorials talks about how to train a model but not so many are clear about how to deploy a model.



I would like to know what is common to do, knowing that I am doing Time Serie Forecasting which is a specific problem...



Thanks,










share|improve this question











$endgroup$




















    2












    $begingroup$


    I have trained and validated my LSTM and I would like to deploy it.
    So, I know that we can save and load the Sequential object of Keras (I am working with Keras as you can guess). I thus implemented a code using these functions.



    But, I would like to know whether I must train my model with all the available data (training + test) or just on the training set as I did during my study.
    Many tutorials talks about how to train a model but not so many are clear about how to deploy a model.



    I would like to know what is common to do, knowing that I am doing Time Serie Forecasting which is a specific problem...



    Thanks,










    share|improve this question











    $endgroup$
















      2












      2








      2





      $begingroup$


      I have trained and validated my LSTM and I would like to deploy it.
      So, I know that we can save and load the Sequential object of Keras (I am working with Keras as you can guess). I thus implemented a code using these functions.



      But, I would like to know whether I must train my model with all the available data (training + test) or just on the training set as I did during my study.
      Many tutorials talks about how to train a model but not so many are clear about how to deploy a model.



      I would like to know what is common to do, knowing that I am doing Time Serie Forecasting which is a specific problem...



      Thanks,










      share|improve this question











      $endgroup$




      I have trained and validated my LSTM and I would like to deploy it.
      So, I know that we can save and load the Sequential object of Keras (I am working with Keras as you can guess). I thus implemented a code using these functions.



      But, I would like to know whether I must train my model with all the available data (training + test) or just on the training set as I did during my study.
      Many tutorials talks about how to train a model but not so many are clear about how to deploy a model.



      I would like to know what is common to do, knowing that I am doing Time Serie Forecasting which is a specific problem...



      Thanks,







      deep-learning time-series lstm






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 6 at 12:56







      kakarotto

















      asked Aug 6 at 12:32









      kakarottokakarotto

      253 bronze badges




      253 bronze badges























          1 Answer
          1






          active

          oldest

          votes


















          3












          $begingroup$

          Personally, I would side with deploy it as is. I.e. do not retrain on all the data.



          Once you train on new data, then you have a new model. You have no idea how this model is going to react to unseen test data coming in from the big wide world. You can’t validate or test it, because you’ve used all that data up in training.



          Who knows what might happen!



          As you receive more data and get feedback on the model you can create new train/test sets, fine tune the model, then redeploy it as required.






          share|improve this answer











          $endgroup$














          • $begingroup$
            Your answer confirms my feeling. Thank you very much.
            $endgroup$
            – kakarotto
            Aug 6 at 13:36











          • $begingroup$
            Glad I could help! I’ve edited the answer slightly to highlight how I would update the model later on. Don’t recreate a new train/test set from scratch, just use new data to help fine tune the model.
            $endgroup$
            – dijksterhuis
            Aug 6 at 13:40










          • $begingroup$
            Oh thanks. Now, a quick related question. Can I try to automate this process with callbacks functions. For instance, let's assume that I deployed a given model for a monthly-sampled time serie. Assuming it works after 3 months in the production environment, can I re-train it automatically with a script using callback functions (early stopping, model checkpoints and so on) so that I do not need to work on this as seriously as I did before its deployment ? It would assume a static architecture (layers, dropout) but does it make sense to do so ? Thanks
            $endgroup$
            – kakarotto
            Aug 6 at 13:57










          • $begingroup$
            I would strongly advise that you make sure any changes are verified and looked at by a human before it is deployed, as it’s always good to double check it’s not gone haywire. But yes, automation sounds like a sensible idea to reduce your ongoing workload. Checkpoints are good bet to keep a static version for each month, for example. Then you can always rollback to last month if any issues.
            $endgroup$
            – dijksterhuis
            Aug 6 at 14:10










          • $begingroup$
            Yes, that makes me aware of the necessity to document correctly what is done so that someone else than me can check and double check things even if some processes are automatized. Thanks again :) hope people will find your answer and upvote it.
            $endgroup$
            – kakarotto
            Aug 6 at 15:31













          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "557"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f57050%2fhow-to-deploy-a-lstm-model%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          3












          $begingroup$

          Personally, I would side with deploy it as is. I.e. do not retrain on all the data.



          Once you train on new data, then you have a new model. You have no idea how this model is going to react to unseen test data coming in from the big wide world. You can’t validate or test it, because you’ve used all that data up in training.



          Who knows what might happen!



          As you receive more data and get feedback on the model you can create new train/test sets, fine tune the model, then redeploy it as required.






          share|improve this answer











          $endgroup$














          • $begingroup$
            Your answer confirms my feeling. Thank you very much.
            $endgroup$
            – kakarotto
            Aug 6 at 13:36











          • $begingroup$
            Glad I could help! I’ve edited the answer slightly to highlight how I would update the model later on. Don’t recreate a new train/test set from scratch, just use new data to help fine tune the model.
            $endgroup$
            – dijksterhuis
            Aug 6 at 13:40










          • $begingroup$
            Oh thanks. Now, a quick related question. Can I try to automate this process with callbacks functions. For instance, let's assume that I deployed a given model for a monthly-sampled time serie. Assuming it works after 3 months in the production environment, can I re-train it automatically with a script using callback functions (early stopping, model checkpoints and so on) so that I do not need to work on this as seriously as I did before its deployment ? It would assume a static architecture (layers, dropout) but does it make sense to do so ? Thanks
            $endgroup$
            – kakarotto
            Aug 6 at 13:57










          • $begingroup$
            I would strongly advise that you make sure any changes are verified and looked at by a human before it is deployed, as it’s always good to double check it’s not gone haywire. But yes, automation sounds like a sensible idea to reduce your ongoing workload. Checkpoints are good bet to keep a static version for each month, for example. Then you can always rollback to last month if any issues.
            $endgroup$
            – dijksterhuis
            Aug 6 at 14:10










          • $begingroup$
            Yes, that makes me aware of the necessity to document correctly what is done so that someone else than me can check and double check things even if some processes are automatized. Thanks again :) hope people will find your answer and upvote it.
            $endgroup$
            – kakarotto
            Aug 6 at 15:31















          3












          $begingroup$

          Personally, I would side with deploy it as is. I.e. do not retrain on all the data.



          Once you train on new data, then you have a new model. You have no idea how this model is going to react to unseen test data coming in from the big wide world. You can’t validate or test it, because you’ve used all that data up in training.



          Who knows what might happen!



          As you receive more data and get feedback on the model you can create new train/test sets, fine tune the model, then redeploy it as required.






          share|improve this answer











          $endgroup$














          • $begingroup$
            Your answer confirms my feeling. Thank you very much.
            $endgroup$
            – kakarotto
            Aug 6 at 13:36











          • $begingroup$
            Glad I could help! I’ve edited the answer slightly to highlight how I would update the model later on. Don’t recreate a new train/test set from scratch, just use new data to help fine tune the model.
            $endgroup$
            – dijksterhuis
            Aug 6 at 13:40










          • $begingroup$
            Oh thanks. Now, a quick related question. Can I try to automate this process with callbacks functions. For instance, let's assume that I deployed a given model for a monthly-sampled time serie. Assuming it works after 3 months in the production environment, can I re-train it automatically with a script using callback functions (early stopping, model checkpoints and so on) so that I do not need to work on this as seriously as I did before its deployment ? It would assume a static architecture (layers, dropout) but does it make sense to do so ? Thanks
            $endgroup$
            – kakarotto
            Aug 6 at 13:57










          • $begingroup$
            I would strongly advise that you make sure any changes are verified and looked at by a human before it is deployed, as it’s always good to double check it’s not gone haywire. But yes, automation sounds like a sensible idea to reduce your ongoing workload. Checkpoints are good bet to keep a static version for each month, for example. Then you can always rollback to last month if any issues.
            $endgroup$
            – dijksterhuis
            Aug 6 at 14:10










          • $begingroup$
            Yes, that makes me aware of the necessity to document correctly what is done so that someone else than me can check and double check things even if some processes are automatized. Thanks again :) hope people will find your answer and upvote it.
            $endgroup$
            – kakarotto
            Aug 6 at 15:31













          3












          3








          3





          $begingroup$

          Personally, I would side with deploy it as is. I.e. do not retrain on all the data.



          Once you train on new data, then you have a new model. You have no idea how this model is going to react to unseen test data coming in from the big wide world. You can’t validate or test it, because you’ve used all that data up in training.



          Who knows what might happen!



          As you receive more data and get feedback on the model you can create new train/test sets, fine tune the model, then redeploy it as required.






          share|improve this answer











          $endgroup$



          Personally, I would side with deploy it as is. I.e. do not retrain on all the data.



          Once you train on new data, then you have a new model. You have no idea how this model is going to react to unseen test data coming in from the big wide world. You can’t validate or test it, because you’ve used all that data up in training.



          Who knows what might happen!



          As you receive more data and get feedback on the model you can create new train/test sets, fine tune the model, then redeploy it as required.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Aug 6 at 13:39

























          answered Aug 6 at 13:29









          dijksterhuisdijksterhuis

          1714 bronze badges




          1714 bronze badges














          • $begingroup$
            Your answer confirms my feeling. Thank you very much.
            $endgroup$
            – kakarotto
            Aug 6 at 13:36











          • $begingroup$
            Glad I could help! I’ve edited the answer slightly to highlight how I would update the model later on. Don’t recreate a new train/test set from scratch, just use new data to help fine tune the model.
            $endgroup$
            – dijksterhuis
            Aug 6 at 13:40










          • $begingroup$
            Oh thanks. Now, a quick related question. Can I try to automate this process with callbacks functions. For instance, let's assume that I deployed a given model for a monthly-sampled time serie. Assuming it works after 3 months in the production environment, can I re-train it automatically with a script using callback functions (early stopping, model checkpoints and so on) so that I do not need to work on this as seriously as I did before its deployment ? It would assume a static architecture (layers, dropout) but does it make sense to do so ? Thanks
            $endgroup$
            – kakarotto
            Aug 6 at 13:57










          • $begingroup$
            I would strongly advise that you make sure any changes are verified and looked at by a human before it is deployed, as it’s always good to double check it’s not gone haywire. But yes, automation sounds like a sensible idea to reduce your ongoing workload. Checkpoints are good bet to keep a static version for each month, for example. Then you can always rollback to last month if any issues.
            $endgroup$
            – dijksterhuis
            Aug 6 at 14:10










          • $begingroup$
            Yes, that makes me aware of the necessity to document correctly what is done so that someone else than me can check and double check things even if some processes are automatized. Thanks again :) hope people will find your answer and upvote it.
            $endgroup$
            – kakarotto
            Aug 6 at 15:31
















          • $begingroup$
            Your answer confirms my feeling. Thank you very much.
            $endgroup$
            – kakarotto
            Aug 6 at 13:36











          • $begingroup$
            Glad I could help! I’ve edited the answer slightly to highlight how I would update the model later on. Don’t recreate a new train/test set from scratch, just use new data to help fine tune the model.
            $endgroup$
            – dijksterhuis
            Aug 6 at 13:40










          • $begingroup$
            Oh thanks. Now, a quick related question. Can I try to automate this process with callbacks functions. For instance, let's assume that I deployed a given model for a monthly-sampled time serie. Assuming it works after 3 months in the production environment, can I re-train it automatically with a script using callback functions (early stopping, model checkpoints and so on) so that I do not need to work on this as seriously as I did before its deployment ? It would assume a static architecture (layers, dropout) but does it make sense to do so ? Thanks
            $endgroup$
            – kakarotto
            Aug 6 at 13:57










          • $begingroup$
            I would strongly advise that you make sure any changes are verified and looked at by a human before it is deployed, as it’s always good to double check it’s not gone haywire. But yes, automation sounds like a sensible idea to reduce your ongoing workload. Checkpoints are good bet to keep a static version for each month, for example. Then you can always rollback to last month if any issues.
            $endgroup$
            – dijksterhuis
            Aug 6 at 14:10










          • $begingroup$
            Yes, that makes me aware of the necessity to document correctly what is done so that someone else than me can check and double check things even if some processes are automatized. Thanks again :) hope people will find your answer and upvote it.
            $endgroup$
            – kakarotto
            Aug 6 at 15:31















          $begingroup$
          Your answer confirms my feeling. Thank you very much.
          $endgroup$
          – kakarotto
          Aug 6 at 13:36





          $begingroup$
          Your answer confirms my feeling. Thank you very much.
          $endgroup$
          – kakarotto
          Aug 6 at 13:36













          $begingroup$
          Glad I could help! I’ve edited the answer slightly to highlight how I would update the model later on. Don’t recreate a new train/test set from scratch, just use new data to help fine tune the model.
          $endgroup$
          – dijksterhuis
          Aug 6 at 13:40




          $begingroup$
          Glad I could help! I’ve edited the answer slightly to highlight how I would update the model later on. Don’t recreate a new train/test set from scratch, just use new data to help fine tune the model.
          $endgroup$
          – dijksterhuis
          Aug 6 at 13:40












          $begingroup$
          Oh thanks. Now, a quick related question. Can I try to automate this process with callbacks functions. For instance, let's assume that I deployed a given model for a monthly-sampled time serie. Assuming it works after 3 months in the production environment, can I re-train it automatically with a script using callback functions (early stopping, model checkpoints and so on) so that I do not need to work on this as seriously as I did before its deployment ? It would assume a static architecture (layers, dropout) but does it make sense to do so ? Thanks
          $endgroup$
          – kakarotto
          Aug 6 at 13:57




          $begingroup$
          Oh thanks. Now, a quick related question. Can I try to automate this process with callbacks functions. For instance, let's assume that I deployed a given model for a monthly-sampled time serie. Assuming it works after 3 months in the production environment, can I re-train it automatically with a script using callback functions (early stopping, model checkpoints and so on) so that I do not need to work on this as seriously as I did before its deployment ? It would assume a static architecture (layers, dropout) but does it make sense to do so ? Thanks
          $endgroup$
          – kakarotto
          Aug 6 at 13:57












          $begingroup$
          I would strongly advise that you make sure any changes are verified and looked at by a human before it is deployed, as it’s always good to double check it’s not gone haywire. But yes, automation sounds like a sensible idea to reduce your ongoing workload. Checkpoints are good bet to keep a static version for each month, for example. Then you can always rollback to last month if any issues.
          $endgroup$
          – dijksterhuis
          Aug 6 at 14:10




          $begingroup$
          I would strongly advise that you make sure any changes are verified and looked at by a human before it is deployed, as it’s always good to double check it’s not gone haywire. But yes, automation sounds like a sensible idea to reduce your ongoing workload. Checkpoints are good bet to keep a static version for each month, for example. Then you can always rollback to last month if any issues.
          $endgroup$
          – dijksterhuis
          Aug 6 at 14:10












          $begingroup$
          Yes, that makes me aware of the necessity to document correctly what is done so that someone else than me can check and double check things even if some processes are automatized. Thanks again :) hope people will find your answer and upvote it.
          $endgroup$
          – kakarotto
          Aug 6 at 15:31




          $begingroup$
          Yes, that makes me aware of the necessity to document correctly what is done so that someone else than me can check and double check things even if some processes are automatized. Thanks again :) hope people will find your answer and upvote it.
          $endgroup$
          – kakarotto
          Aug 6 at 15:31

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Data Science Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          Use MathJax to format equations. MathJax reference.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f57050%2fhow-to-deploy-a-lstm-model%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Grendel Contents Story Scholarship Depictions Notes References Navigation menu10.1093/notesj/gjn112Berserkeree

          Area configuration aggregation error after install Porto themeMagento 2.1 CE Installed but front/backend not loading/workingCSS not loading on page within Magento 2 pageCannot install module in Magento 2no commands defined in the “setup” namespace. in Magento2Magento 2: Static files are present but shows 404Why do i have to always run the commands to clean cache in Magento 2.1.8?Failure reason: 'Unable to unserialize value.'Error 500 after magento migrationIn production mode the site does not loadMagento 2 : Error 500 after installing

          Middle Expansion Olielle Resaix Definition: Uttering songs of triumph shouting with joy triumphant exulting Sejunction Journal 붙다 달 고급 품목 외출 The stretch trades the screeching tin. Definition: The act of speaking with a drawl a drawl Cough Sand Definition: An uproar a quarrel a noisy outbreak Shake Iron Publicize Horse House Baby 사과 Resaix Flaggy Jelly Temporary Unequaled Puppet A drop in the bucket Shrew 성격 회원 성질 미팅 The burn frames the tacky quality. Materialistic The smoke reduces the way. Yammoe Nondescript Cheek 얼굴 배 약하다 날리다 타다 The illegal country shows the iron. Help Rule Drearien Smoke Teaching Meaty Wasp Abraham Lincoln Jaws 진심 수리하다 Size Cork Idea Convert Think Lark John Lennon 거울 청소 군 추천하다 아이스크림