{"id":19,"date":"2022-01-14T05:45:21","date_gmt":"2022-01-14T05:45:21","guid":{"rendered":"https:\/\/blogs.oregonstate.edu\/cannons\/?p=19"},"modified":"2022-01-14T05:45:21","modified_gmt":"2022-01-14T05:45:21","slug":"getting-started-with-tensorflow","status":"publish","type":"post","link":"https:\/\/blogs.oregonstate.edu\/cannons\/2022\/01\/14\/getting-started-with-tensorflow\/","title":{"rendered":"Getting Started with TensorFlow"},"content":{"rendered":"\n<p>Getting started with TensorFlow can be a messy task.&nbsp;<\/p>\n\n\n\n<p>In this blog I am going to demonstrate two ways you can get started, one using Google Colaboratory and the other setting up on your own machine.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Google Colaboratory<\/strong><\/h2>\n\n\n\n<p>\u201cColab\u201d for short. This is a tool supported by Google which allows you to write and run Python code in your browser without doing a lot of setup. <strong>If you want to be able to write code from any computer and get started quickly, this is the way to go.<\/strong> Here is how I got started with it:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Create an account with Google.<\/li><li>Open Google Drive from the Apps Menu on the Google homepage<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"441\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/DriveImage-1024x441.png\" alt=\"\" class=\"wp-image-21\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/DriveImage-1024x441.png 1024w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/DriveImage-300x129.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/DriveImage-768x330.png 768w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/DriveImage.png 1332w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>3. Create a new Colab Notebook<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1002\" height=\"542\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/NewDoc.png\" alt=\"\" class=\"wp-image-22\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/NewDoc.png 1002w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/NewDoc-300x162.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/NewDoc-768x415.png 768w\" sizes=\"auto, (max-width: 1002px) 100vw, 1002px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"989\" height=\"693\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/NewColab.png\" alt=\"\" class=\"wp-image-23\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/NewColab.png 989w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/NewColab-300x210.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/NewColab-768x538.png 768w\" sizes=\"auto, (max-width: 989px) 100vw, 989px\" \/><\/figure>\n\n\n\n<p>4. You should see a page that looks like this<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"955\" height=\"457\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/UntitledNewPage.png\" alt=\"\" class=\"wp-image-24\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/UntitledNewPage.png 955w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/UntitledNewPage-300x144.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/UntitledNewPage-768x368.png 768w\" sizes=\"auto, (max-width: 955px) 100vw, 955px\" \/><\/figure>\n\n\n\n<p>This is something they call a \u201cnotebook\u201d (if you have used Jupyter Notebooks before you will already be familiar with it). They are documents which contain both boring normal text and blocks of code.<\/p>\n\n\n\n<p>5. When you open a notebook for the first time there will already be a box to add code to. It is the box with the little \u201cplay\u201d symbol on the left. To start writing code you just need to click inside the box.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"959\" height=\"362\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/helloWorld.png\" alt=\"\" class=\"wp-image-25\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/helloWorld.png 959w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/helloWorld-300x113.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/helloWorld-768x290.png 768w\" sizes=\"auto, (max-width: 959px) 100vw, 959px\" \/><\/figure>\n\n\n\n<p>6. Run the code by pressing the play button next to it<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"959\" height=\"362\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/pressPlay.png\" alt=\"\" class=\"wp-image-27\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/pressPlay.png 959w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/pressPlay-300x113.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/pressPlay-768x290.png 768w\" sizes=\"auto, (max-width: 959px) 100vw, 959px\" \/><\/figure>\n\n\n\n<p>7. To add a new code block, hit the \u201c+ Code\u201d button in the upper left<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"959\" height=\"362\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/newCodeBlock.png\" alt=\"\" class=\"wp-image-28\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/newCodeBlock.png 959w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/newCodeBlock-300x113.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/newCodeBlock-768x290.png 768w\" sizes=\"auto, (max-width: 959px) 100vw, 959px\" \/><\/figure>\n\n\n\n<p>8. Colab will have all the modules you need, so to get started with TensorFlow you just need to import the tensorflow module into your code<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"959\" height=\"415\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/exampleTensorBlock.png\" alt=\"\" class=\"wp-image-29\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/exampleTensorBlock.png 959w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/exampleTensorBlock-300x130.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/exampleTensorBlock-768x332.png 768w\" sizes=\"auto, (max-width: 959px) 100vw, 959px\" \/><\/figure>\n\n\n\n<p>9. The result of executing this code should be a printed version of the tensor you created.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"401\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/exampleTensorBlockResult.png\" alt=\"\" class=\"wp-image-30\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/exampleTensorBlockResult.png 960w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/exampleTensorBlockResult-300x125.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/exampleTensorBlockResult-768x321.png 768w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/figure>\n\n\n\n<p>From here you can proceed to write any of the machine learning code you want! There are several advantages to this approach:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>All of the libraries you will need are already there. Setup takes less than a minute.<\/li><li>Computations are run on Google\u2019s servers, so it won\u2019t matter what device you code from, so long as you have access to the internet.<\/li><li>Google drive makes it easy to share documents with others<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Local Installation with Docker<\/strong><\/h2>\n\n\n\n<p>This process is considerably more complicated. The process for every computer and environment can be slightly different, so the best I can do is show you what worked for me. I\u2019m using a Windows 10 computer and developing with Visual Studio Code.<\/p>\n\n\n\n<p>At the time of this writing (January 2022) the latest version of TensorFlow, v. 2.7, is incompatible with the latest version of Python, v. 3.10. An attempt to install the library with pip is met with the following error.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"870\" height=\"57\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/pipError.png\" alt=\"\" class=\"wp-image-31\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/pipError.png 870w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/pipError-300x20.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/pipError-768x50.png 768w\" sizes=\"auto, (max-width: 870px) 100vw, 870px\" \/><\/figure>\n\n\n\n<p>The solution is either to downgrade your python version system wide, or to utilize a virtual environment (the recommended option).<\/p>\n\n\n\n<p>I decided to go the virtual environment route using Docker.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Install Docker Desktop from the <a href=\"https:\/\/www.docker.com\/products\/docker-desktop\">official website<\/a><\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"931\" height=\"524\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/dockerDownload.png\" alt=\"\" class=\"wp-image-32\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/dockerDownload.png 931w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/dockerDownload-300x169.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/dockerDownload-768x432.png 768w\" sizes=\"auto, (max-width: 931px) 100vw, 931px\" \/><\/figure>\n\n\n\n<p>2. Make sure that your computer has <a href=\"https:\/\/docs.microsoft.com\/en-us\/virtualization\/hyper-v-on-windows\/quick-start\/enable-hyper-v\">virtualization enabled<\/a> and that Docker is running.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"581\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/dockerDesktop-1024x581.png\" alt=\"\" class=\"wp-image-33\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/dockerDesktop-1024x581.png 1024w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/dockerDesktop-300x170.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/dockerDesktop-768x435.png 768w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/dockerDesktop.png 1268w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>3. Open a terminal and enter the command <em>docker pull tensorflow\/tensorflow<\/em>. This will retrieve an <em>Image<\/em> from DockerHub. The following explanation isn\u2019t exactly correct, but you can think of an image like a collection of all the software you need. For example, the image might say \u201cWe need the Ubuntu Linux Operating System with Python version 3.8 and TensorFlow version 2.7.\u201d Downloading this image could take around 5 &#8211; 15 minutes depending on the speed of your network.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"879\" height=\"216\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/dockerPull.png\" alt=\"\" class=\"wp-image-34\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/dockerPull.png 879w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/dockerPull-300x74.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/dockerPull-768x189.png 768w\" sizes=\"auto, (max-width: 879px) 100vw, 879px\" \/><\/figure>\n\n\n\n<p>4. Open a VSCode window and go to the extensions tab<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"391\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/extensionsTab.png\" alt=\"\" class=\"wp-image-36\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/extensionsTab.png 768w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/extensionsTab-300x153.png 300w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/figure>\n\n\n\n<p>5. Search for and install the Remote &#8211; Development Extension pack from Microsoft<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"321\" height=\"392\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/searchRemote.png\" alt=\"\" class=\"wp-image-37\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/searchRemote.png 321w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/searchRemote-246x300.png 246w\" sizes=\"auto, (max-width: 321px) 100vw, 321px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1006\" height=\"548\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/RemoteInstall.png\" alt=\"\" class=\"wp-image-38\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/RemoteInstall.png 1006w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/RemoteInstall-300x163.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/RemoteInstall-768x418.png 768w\" sizes=\"auto, (max-width: 1006px) 100vw, 1006px\" \/><\/figure>\n\n\n\n<p>6. Open a VSCode window with the folder you would like to develop in.<\/p>\n\n\n\n<p>7. Add a folder titled .devcontainer and in this folder add a file called devcontainer.json. This is a configuration file which will tell VSCode how you want it to set up a development container. The reason we do this is because while your computer doesn\u2019t have the right versions of software to run TensorFlow, the image you just imported with Docker does. The \u201ccontainer\u201d you create in this step is a live, running instance of the blueprint the Image provided. You can read more about containers on the <a href=\"https:\/\/www.docker.com\/resources\/what-container\">docker webpage<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"310\" height=\"112\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/addDevContainer.png\" alt=\"\" class=\"wp-image-39\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/addDevContainer.png 310w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/addDevContainer-300x108.png 300w\" sizes=\"auto, (max-width: 310px) 100vw, 310px\" \/><\/figure>\n\n\n\n<p>8. Inside devcontainer.json you will need to add these lines of code. The \u201cimage\u201d option tells VSCode which image it should use to build the container. We want &#8220;tensorflow\/tensorflow.&#8221; The \u201cextensions\u201d option tells VSCode which extensions it should use once it is inside the virtual environment of the container. We want to designate \u201cms-python.python\u201d so that VSCode will help us with intellisense.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1023\" height=\"319\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/JsonOptions.png\" alt=\"\" class=\"wp-image-41\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/JsonOptions.png 1023w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/JsonOptions-300x94.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/JsonOptions-768x239.png 768w\" sizes=\"auto, (max-width: 1023px) 100vw, 1023px\" \/><\/figure>\n\n\n\n<p>9. The next step is to actually open this folder in the development container. Click the green &gt;&lt; symbol in the lower left corner and then select the \u201cReopen in Container\u201d option. Alternatively you can find this option by pressing F1 and then searching for \u201cReopen in Container\u201d<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"771\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/Reopen.png\" alt=\"\" class=\"wp-image-43\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/Reopen.png 1024w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/Reopen-300x226.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/Reopen-768x578.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>10. Now all that is left to do is check that it worked. Try creating a file test.py and adding the following lines of code. If you have done things correctly, when you execute the program you should see information about the Tensor you just created.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1021\" height=\"264\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/testPy.png\" alt=\"\" class=\"wp-image-44\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/testPy.png 1021w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/testPy-300x78.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/testPy-768x199.png 768w\" sizes=\"auto, (max-width: 1021px) 100vw, 1021px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"705\" height=\"323\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/tensorOutput.png\" alt=\"\" class=\"wp-image-45\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/tensorOutput.png 705w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/5212\/files\/2022\/01\/tensorOutput-300x137.png 300w\" sizes=\"auto, (max-width: 705px) 100vw, 705px\" \/><\/figure>\n\n\n\n<p>There are more sophisticated approaches you can take, but this should be enough to get you started. When you start getting to the point where you need other libraries or packages you can read more about how to customize your development environment by checking the VSCode documentation <a href=\"https:\/\/code.visualstudio.com\/docs\/remote\/create-dev-container#_set-up-a-folder-to-run-in-a-container\">here<\/a> and <a href=\"https:\/\/code.visualstudio.com\/docs\/remote\/devcontainerjson-reference\">here<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Getting started with TensorFlow can be a messy task.&nbsp; In this blog I am going to demonstrate two ways you can get started, one using Google Colaboratory and the other setting up on your own machine. Google Colaboratory \u201cColab\u201d for short. This is a tool supported by Google which allows you to write and run&hellip; <a class=\"more-link\" href=\"https:\/\/blogs.oregonstate.edu\/cannons\/2022\/01\/14\/getting-started-with-tensorflow\/\">Continue reading <span class=\"screen-reader-text\">Getting Started with TensorFlow<\/span><\/a><\/p>\n","protected":false},"author":12041,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-19","post","type-post","status-publish","format-standard","hentry","category-uncategorized","entry"],"_links":{"self":[{"href":"https:\/\/blogs.oregonstate.edu\/cannons\/wp-json\/wp\/v2\/posts\/19","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.oregonstate.edu\/cannons\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.oregonstate.edu\/cannons\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/cannons\/wp-json\/wp\/v2\/users\/12041"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/cannons\/wp-json\/wp\/v2\/comments?post=19"}],"version-history":[{"count":5,"href":"https:\/\/blogs.oregonstate.edu\/cannons\/wp-json\/wp\/v2\/posts\/19\/revisions"}],"predecessor-version":[{"id":46,"href":"https:\/\/blogs.oregonstate.edu\/cannons\/wp-json\/wp\/v2\/posts\/19\/revisions\/46"}],"wp:attachment":[{"href":"https:\/\/blogs.oregonstate.edu\/cannons\/wp-json\/wp\/v2\/media?parent=19"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/cannons\/wp-json\/wp\/v2\/categories?post=19"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/cannons\/wp-json\/wp\/v2\/tags?post=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}