Search code examples
pythontensorflowexecutionpython-idle

Run edited python script step by step / without reloading dataset


I work on a python script executing standard image recognition processing using tensorflow. Using Python 3.8, Tensorflow 2, Idle lauched from a virtual env.

Since I am following a tutorial, I would like to augment and execute my script chunk by chunk : e.g.

  • write the code for the data load
  • execute
  • write the code for training
  • execute only training (without reloading the data)

Is there a way to run a python script chunk by chunk, without restarting the idle shell, and keeping results from the previous steps?


Solution

  • Read–eval–print loop (REPL)

    Yes , this is what exactly you are looking for.

    This is an interactive environment that takes single user inputs, executes them, and returns the result to the user; a program written in a REPL environment is executed piecewise

    There are lot of Platforms which offer this.

    Jupyter Notebook (Local)

    Google Colab (Online)

    I prefer Google colab .

    Its free & we don't have to waste our Local system Resources