nlintz / TensorFlow-Tutorials

Simple tutorials using Google's TensorFlow Framework
6k stars 1.52k forks source link

The IPython Notebook Format #55

Closed hunkim closed 7 years ago

hunkim commented 7 years ago

I think having ipynb would be useful to see the results quickly.

@chahuja, could you help?

chahuja commented 7 years ago

Sure. We could divide the scripts into multiple blocks to make it more useful. And use the inline plotting functionality to see the results in the notebook itself.

chahuja commented 7 years ago

Would it be useful to have the notebook with outputs printed already?

hunkim commented 7 years ago

I think so.

On Tue, Oct 18, 2016 at 1:38 PM, Chaitanya Ahuja notifications@github.com wrote:

Would it be useful to have the notebook with outputs printed already?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nlintz/TensorFlow-Tutorials/issues/55#issuecomment-254411823, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3DV1GoyCX6Cz3_j4a6M4FjuNBEvESUks5q1FtkgaJpZM4KZY9h .

hunkim commented 7 years ago

One potential issue is syncing py and ipynb files. Once people update py, should we also update all ipynb files manually? Is there any way to automatically sync?

chahuja commented 7 years ago

There is a way to convert ipynb files to python files but not vice-versa

jupyter nbconvert <ipynb-file> --to=script > <python-file>

Generally, a better approach to working with ipynb files is to make the actual edits in the notebook and then create python scripts, but that would require a significant change for the current contributors.

hunkim commented 7 years ago

Super! Once we have all ipynb files, we can encourage developers to send a PR on ipynb files only. We need a simple script to generate py files.

On Tue, Oct 18, 2016 at 3:02 PM, Chaitanya Ahuja notifications@github.com wrote:

There is a way to convert ipynb files to python files but not vice-versa

jupyter nbconvert --to=script >

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nlintz/TensorFlow-Tutorials/issues/55#issuecomment-254423883, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3DV_RZonCLV2Nlao_vketJmW8z2JZNks5q1G8bgaJpZM4KZY9h .

chahuja commented 7 years ago

Created a pull request with an inital version

Could you run the 05_convolutional_net.ipynb on your machine? For some reason convolution functions are not working on my build right now.

hunkim commented 7 years ago

I'll check that later. Should we add a script to convert from ipynb to py and ask other developers to edit only ipynb?

chahuja commented 7 years ago

Yeah, that would be a good idea. But, what would be better, a script to convert all ipynb files to their respective py files or one file at a time?

hunkim commented 7 years ago

One script makes sense to me.

chahuja commented 7 years ago

For use by contributors at a later stage, conversion of one file at a time makes more sense.