Getting Started with TensorFlow in Google Colaboratory

It is a very exciting technology that allows Data Scientists to focus on building Machine Learning models instead of the logistics!In this article, we’ll not only walk through the basics of using Colab, but also help you get started with TensorFlow with easy to understand examples.Here we go!Opening up a Colab NotebookWhen using Colab for the first time, you can launch a new notebook here:Google ColaboratoryEdit descriptioncolab.research.google.comOnce you have a notebook created, it’ll be saved in your Google Drive (Colab Notebooks folder)..You can access it by visiting your Google Drive page, then either double-click on the file name, or right-click, and then choose “Open with Colab”.Connecting with GitHubThe builders of Colab are so thoughtful that they even baked in the functionality of committing to Github.To connect with GitHub, you first need to create a repo with a master branch on GitHub..Then, from the drop-down menu, select “File —Save a copy in GitHub”..You will be asked to authorize only for the first time..What’s handy is that it even allows you to include an “Open in Colab” button in your notebook like this:Enabling GPU SupportTo turn on GPU for your Deep Learning projects, just go to the drop-down menu and select “Runtime — Change runtime type — Hardware accelerator” and choose GPU:Working with CellsFor the most part, it’s exactly the same with a local Jupyter Notebook..For example, to run a code cell, you can just press “Shift + Enter”..Check out the below frequently used keyboard shortcuts (on Windows using Chrome):Run cell: “Shift + Enter”Delete cell: “Ctrl + M, then D”Undo: “Ctrl + Shift + Z”Convert to code cell: “Ctrl + M, then Y”Convert to markdown cell: “Ctrl + M, then M”Save notebook: “Ctrl + S”Open up the shortcut screen: “Ctrl + M, then H”Working with FilesYou can also upload data to your Colab folder..See image below:TensorsTensorFlow bases its name on the word “tensor”..What is a tensor anyway?.In short, a multi-dimensional array..Let’s see what that means!We have one single number, e.g..6, we call it a “scalar”;We have three numbers, e.g.. More details

Leave a Reply