{"id":5991,"date":"2018-08-27T08:27:55","date_gmt":"2018-08-27T08:27:55","guid":{"rendered":"https:\/\/nusit.nus.edu.sg\/technus\/hpc-technus\/deep-learning-best-practices-checkpointing-deep-learning-model-training-copy-copy-2\/"},"modified":"2019-09-24T04:08:39","modified_gmt":"2019-09-24T04:08:39","slug":"preview-jupyterhub-hpc","status":"publish","type":"post","link":"https:\/\/nusit.nus.edu.sg\/services\/hpc-newsletter\/preview-jupyterhub-hpc\/","title":{"rendered":"\u00bb A Preview of Jupyterhub on HPC"},"content":{"rendered":"<section class=\"wpb-content-wrapper\"><p>[vc_row css=”.vc_custom_1568089238590{padding-top: 0px !important;padding-bottom: 0px !important;}” el_class=”hpc-microsite-technus hpc-microsite”][vc_column][vc_row_inner][vc_column_inner]<div class=\"section-title-wrapper ip-section-title shortcode-rand-1 pixzlo-inline-css\" data-css=\"".shortcode-rand-1 .background-title { font-family:Abril Fatface;font-weight:400;font-style:normal }.shortcode-rand-1 .section-title { text-transform: none; }"\"><div class=\"title-wrap\"><h2 class=\"section-title\">A PREVIEW OF JUPYTERHUB ON HPC<\/h2><\/div><!-- .title-wrap --><div class=\"section-description\"><em>By Ku Wee Kiat \u2013 NUS IT on 27 Aug, 2018<\/em><\/div><!-- .section-description --><div class=\"button-section\"><\/div><!-- .button-section --><\/div><!-- .section-title-wrapper --><div class=\"section-title-wrapper ip-section-title-h5 shortcode-rand-2 pixzlo-inline-css\" data-css=\"".shortcode-rand-2 .background-title { font-family:Abril Fatface;font-weight:400;font-style:normal }.shortcode-rand-2 .section-title { text-transform: none; }"\"><div class=\"title-wrap\"><h5 class=\"section-title\">What is Jupyter?<\/h5><\/div><!-- .title-wrap --><div class=\"section-description\"><\/div><!-- .section-description --><div class=\"button-section\"><\/div><!-- .button-section --><\/div><!-- .section-title-wrapper -->[vc_column_text]It is an open source web application that allows users to create and share documents that contain code, equations, visualisations and narrative text. It is useful for data exploration, cleaning and transformation, numerical simulation, statistical modelling, data visualisation, machine learning and much more.[\/vc_column_text]<div class=\"section-title-wrapper ip-section-title-h5 shortcode-rand-3 pixzlo-inline-css\" data-css=\"".shortcode-rand-3 .background-title { font-family:Abril Fatface;font-weight:400;font-style:normal }.shortcode-rand-3 .section-title { text-transform: none; }"\"><div class=\"title-wrap\"><h5 class=\"section-title\">What is Jupyterhub?<\/h5><\/div><!-- .title-wrap --><div class=\"section-description\"><\/div><!-- .section-description --><div class=\"button-section\"><\/div><!-- .button-section --><\/div><!-- .section-title-wrapper -->[vc_column_text]It is simply a multi-user version of Jupyter. It is designed for companies, classrooms and research labs with user management and authentication via PAM (Pluggable Authentication Modules), OAuth or other directory services like Active Directory.[\/vc_column_text][vc_column_text]The following is a brief introduction on how to access and use Jupyterhub. Exact steps might differ when Jupyterhub is finally deployed. This article will also provide a preview of Jupyterhub on HPC and something interesting users can do with it which is visualising neural networks.[\/vc_column_text][vc_column_text]<\/p>\n<h6><span style=\"color: #003d7c;\">Accessing Jupyterhub<\/span><\/h6>\n<p>[\/vc_column_text][\/vc_column_inner][\/vc_row_inner][vc_row_inner][vc_column_inner width=”1\/3″][vc_single_image image=”5999″ img_size=”full” add_caption=”yes” el_class=”InnerPage_tier0_img”][\/vc_column_inner][vc_column_inner width=”2\/3″][\/vc_column_inner][\/vc_row_inner][vc_row_inner][vc_column_inner][vc_column_text]After signing in, users will be presented with the home screen. Simply click \u201cStart My Server\u201d to proceed to the next step, which is to select your job profile.[\/vc_column_text][vc_single_image image=”6000″ img_size=”full” el_class=”InnerPage_tier0_img”][vc_column_text]<\/p>\n<h6><span style=\"color: #003d7c;\">Selecting a Job Profile<\/span><\/h6>\n<p>[\/vc_column_text][vc_single_image image=”6002″ img_size=”full” add_caption=”yes” el_class=”InnerPage_tier0_img”][vc_column_text]More job profiles might be available in the future as our resources expand. For example, GPU (Graphics Processing Unit) \u00a0job profiles for data analytics\/AI\/deep learning.[\/vc_column_text][vc_column_text]Select \u201cserial\u201d for running non-parallel code, and \u201cparallel\u201d with the required computing resource for parallel code.[\/vc_column_text][vc_column_text]<\/p>\n<h6><span style=\"color: #003d7c;\">Launching Your Job<\/span><\/h6>\n<p>[\/vc_column_text][vc_single_image image=”6005″ img_size=”full” add_caption=”yes” el_class=”InnerPage_tier0_img”][vc_column_text]In the backend, Jupyterhub will submit a PBS (Public Broadcasting Service) job script to launch a Jupyter notebook session for you. Similar to submitting PBS job scripts in the command line\/terminal, your Jupyter notebook session job may have to wait in queue.[\/vc_column_text][vc_single_image image=”6006″ img_size=”full” add_caption=”yes” el_class=”InnerPage_tier0_img”][vc_column_text]<\/p>\n<h6><span style=\"color: #003d7c;\">The Jupyter Notebook<\/span><\/h6>\n<p>[\/vc_column_text][vc_column_text]When the server starts up, users will be redirected to a standard Jupyter notebook environment with their home directory displayed. From this screen, you can create new Jupyter python notebooks and more.[\/vc_column_text][vc_single_image image=”6010″ img_size=”full” el_class=”InnerPage_tier0_img”][vc_single_image image=”6012″ img_size=”full” add_caption=”yes” el_class=”InnerPage_tier0_img”][vc_column_text]<\/p>\n<h6><span style=\"color: #003d7c;\">Working with Jupyter Notebooks<\/span><\/h6>\n<p>[\/vc_column_text][vc_single_image image=”6014″ img_size=”full” add_caption=”yes” el_class=”InnerPage_tier0_img”][vc_column_text]Besides plotting the usual plotting of graphs, Jupyter notebooks are useful for visualising neural networks.[\/vc_column_text][vc_column_text]<\/p>\n<h6><span style=\"color: #003d7c;\">Visualising a Simple Convolutional Neural Network (CNN)<\/span><\/h6>\n<p>[\/vc_column_text][vc_column_text]Visualising a neural network can give us useful information about what it is learning. While designing a neural network for the task of image recognition, it is sometimes useful to be able to interpret and understand the model\u2019s predictions.[\/vc_column_text][vc_column_text]Libraries used: Tensorflow, Keras, Numpy, matplotlib[\/vc_column_text][vc_column_text]We train a simple convolutional neural network (CNN) with the following architecture on the MNIST (Modified National Institute of Standards and Technology database) dataset. The network was trained for 10 epochs with a batch size of 256 with the Adam optimiser (Advanced Data Management).[\/vc_column_text][vc_column_text]<\/p>\n<p class=\"bulletList\" style=\"padding-left: 40px;\"><strong>\u2022 <\/strong>Input, size 28x28x1<\/p>\n<p class=\"bulletList\" style=\"padding-left: 40px;\"><strong>\u2022 <\/strong>Convolution, 32 filters, kernel size 3\u00d73, ReLU activation<\/p>\n<p class=\"bulletList\" style=\"padding-left: 40px;\"><strong>\u2022 <\/strong>Convolution, 64 filters, kernel size 3\u00d73, ReLU activation<\/p>\n<p class=\"bulletList\" style=\"padding-left: 40px;\"><strong>\u2022 <\/strong>Max Pool, pool size 2\u00d72<\/p>\n<p class=\"bulletList\" style=\"padding-left: 40px;\"><strong>\u2022 <\/strong>Dropout 0.25<\/p>\n<p class=\"bulletList\" style=\"padding-left: 40px;\"><strong>\u2022 <\/strong>Convolution, 128 filters, kernel_size 3\u00d73, ReLU activation<\/p>\n<p class=\"bulletList\" style=\"padding-left: 40px;\"><strong>\u2022 <\/strong>Max Pool, pool size 2\u00d72<\/p>\n<p class=\"bulletList\" style=\"padding-left: 40px;\"><strong>\u2022 <\/strong>Dropout 0.25<\/p>\n<p class=\"bulletList\" style=\"padding-left: 40px;\"><strong>\u2022 <\/strong>Fully connected, 128 neurons, ReLU activation<\/p>\n<p class=\"bulletList\" style=\"padding-left: 40px;\"><strong>\u2022 <\/strong>Dropout 0.5<\/p>\n<p class=\"bulletList\" style=\"padding-left: 40px;\"><strong>\u2022 <\/strong>Fully connected, 10 neurons, Softmax activation<\/p>\n<p>[\/vc_column_text][\/vc_column_inner][\/vc_row_inner][vc_row_inner][vc_column_inner width=”1\/2″][vc_single_image image=”6018″ img_size=”full” add_caption=”yes” el_class=”InnerPage_tier0_img”][\/vc_column_inner][vc_column_inner width=”1\/2″][\/vc_column_inner][\/vc_row_inner][vc_row_inner][vc_column_inner][vc_single_image image=”6026″ img_size=”full” add_caption=”yes” el_class=”InnerPage_tier0_img”][vc_column_text]With the trained model, we can now visualise the weights of the layers, layer activations given an input, saliency maps and much more.[\/vc_column_text][vc_single_image image=”6027″ img_size=”full” add_caption=”yes” el_class=”InnerPage_tier0_img”][\/vc_column_inner][\/vc_row_inner][vc_row_inner][vc_column_inner width=”1\/2″][vc_single_image image=”6028″ img_size=”full” add_caption=”yes” el_class=”InnerPage_tier0_img”][\/vc_column_inner][vc_column_inner width=”1\/2″][\/vc_column_inner][\/vc_row_inner][vc_row_inner css=”.vc_custom_1568106147024{margin-bottom: 60px !important;}”][vc_column_inner][vc_column_text]The goal of the saliency map is to identify the pixels of an image which contribute the most towards a particular class prediction. Basically, the most important pixels are those that makes the network determine that it belongs to a certain class. Saliency maps are useful for segmenting images, it can be used to localise the area of interest in the image.[\/vc_column_text][vc_column_text]As shown above, Jupyter notebooks can be used for more than just plotting graphs, it can be used for examining and understanding neural networks and many more analytical applications.[\/vc_column_text][vc_column_text]Users can look forward to more visual and interactive software for Data Analytics, Machine Learning and Deep Learning in the future.[\/vc_column_text]<div class=\"section-title-wrapper ip-section-title-h5 shortcode-rand-4 pixzlo-inline-css\" data-css=\"".shortcode-rand-4 .background-title { font-family:Abril Fatface;font-weight:400;font-style:normal }.shortcode-rand-4 .section-title { text-transform: none; }"\"><div class=\"title-wrap\"><h5 class=\"section-title\">Reference<\/h5><\/div><!-- .title-wrap --><div class=\"section-description\"><\/div><!-- .section-description --><div class=\"button-section\"><\/div><!-- .button-section --><\/div><!-- .section-title-wrapper -->[vc_column_text]<\/p>\n<ol>\n<li><strong>Project Jupyter:\u00a0<\/strong><a href=\"http:\/\/jupyter.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/jupyter.org\/<\/a><\/li>\n<li><strong>More on Visualising Convolutional Neural Networks:\u00a0<\/strong>Understanding CNN\u00a0<a href=\"http:\/\/cs231n.github.io\/understanding-cnn\/\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/cs231n.github.io\/understanding-cnn\/<\/a><\/li>\n<li><strong>Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Maps<\/strong>\u00a0<a href=\"https:\/\/arxiv.org\/abs\/1312.6034v2\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/arxiv.org\/abs\/1312.6034v2<\/a><\/li>\n<\/ol>\n<p>Please contact the Data Engineering Technology team at <a href=\"mailto:DataEngineering@nus.edu.sg\">DataEngineering@nus.edu.sg<\/a>\u00a0if you have any query on the above developments.[\/vc_column_text][\/vc_column_inner][\/vc_row_inner][\/vc_column][\/vc_row]<\/p>\n<\/section>","protected":false},"excerpt":{"rendered":"<p>By Ku Wee Kiat \u2013 NUS IT on 27 Aug, 2018<br \/>\nWhat is Jupyter? It is an open source web application that allows users to create and share documents that contain code, …<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_oasis_is_in_workflow":0,"_oasis_original":0,"footnotes":""},"categories":[69,119],"tags":[],"class_list":["post-5991","post","type-post","status-publish","format-standard","hentry","category-hpc-newsletter","category-hpc-technical-updates"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u00bb A Preview of Jupyterhub on HPC - NUS Information Technology | NUS IT Services, Solutions & Governance<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/nusit.nus.edu.sg\/services\/hpc-newsletter\/preview-jupyterhub-hpc\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u00bb A Preview of Jupyterhub on HPC - NUS Information Technology | NUS IT Services, Solutions & Governance\" \/>\n<meta property=\"og:description\" content=\"By Ku Wee Kiat \u2013 NUS IT on 27 Aug, 2018 What is Jupyter? It is an open source web application that allows users to create and share documents that contain code, ...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/nusit.nus.edu.sg\/services\/hpc-newsletter\/preview-jupyterhub-hpc\/\" \/>\n<meta property=\"og:site_name\" content=\"NUS Information Technology | NUS IT Services, Solutions & Governance\" \/>\n<meta property=\"article:published_time\" content=\"2018-08-27T08:27:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-09-24T04:08:39+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/nusit.nus.edu.sg\/services\/hpc-newsletter\/preview-jupyterhub-hpc\/\",\"url\":\"https:\/\/nusit.nus.edu.sg\/services\/hpc-newsletter\/preview-jupyterhub-hpc\/\",\"name\":\"\u00bb A Preview of Jupyterhub on HPC - NUS Information Technology | NUS IT Services, Solutions & Governance\",\"isPartOf\":{\"@id\":\"https:\/\/nusit.nus.edu.sg\/#website\"},\"datePublished\":\"2018-08-27T08:27:55+00:00\",\"dateModified\":\"2019-09-24T04:08:39+00:00\",\"author\":{\"@id\":\"https:\/\/nusit.nus.edu.sg\/#\/schema\/person\/1d48503b1ae5833c749ed5cfc87fda28\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/nusit.nus.edu.sg\/services\/hpc-newsletter\/preview-jupyterhub-hpc\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/nusit.nus.edu.sg\/#website\",\"url\":\"https:\/\/nusit.nus.edu.sg\/\",\"name\":\"NUS Information Technology | NUS IT Services, Solutions & Governance\",\"description\":\"Borderless University, powered by Infinite Technology\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/nusit.nus.edu.sg\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/nusit.nus.edu.sg\/#\/schema\/person\/1d48503b1ae5833c749ed5cfc87fda28\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/nusit.nus.edu.sg\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/955212ca4884ab2a06f3f581f8e497c5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/955212ca4884ab2a06f3f581f8e497c5?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"url\":\"https:\/\/nusit.nus.edu.sg\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u00bb A Preview of Jupyterhub on HPC - NUS Information Technology | NUS IT Services, Solutions & Governance","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/nusit.nus.edu.sg\/services\/hpc-newsletter\/preview-jupyterhub-hpc\/","og_locale":"en_US","og_type":"article","og_title":"\u00bb A Preview of Jupyterhub on HPC - NUS Information Technology | NUS IT Services, Solutions & Governance","og_description":"By Ku Wee Kiat \u2013 NUS IT on 27 Aug, 2018 What is Jupyter? It is an open source web application that allows users to create and share documents that contain code, ...","og_url":"https:\/\/nusit.nus.edu.sg\/services\/hpc-newsletter\/preview-jupyterhub-hpc\/","og_site_name":"NUS Information Technology | NUS IT Services, Solutions & Governance","article_published_time":"2018-08-27T08:27:55+00:00","article_modified_time":"2019-09-24T04:08:39+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/nusit.nus.edu.sg\/services\/hpc-newsletter\/preview-jupyterhub-hpc\/","url":"https:\/\/nusit.nus.edu.sg\/services\/hpc-newsletter\/preview-jupyterhub-hpc\/","name":"\u00bb A Preview of Jupyterhub on HPC - NUS Information Technology | NUS IT Services, Solutions & Governance","isPartOf":{"@id":"https:\/\/nusit.nus.edu.sg\/#website"},"datePublished":"2018-08-27T08:27:55+00:00","dateModified":"2019-09-24T04:08:39+00:00","author":{"@id":"https:\/\/nusit.nus.edu.sg\/#\/schema\/person\/1d48503b1ae5833c749ed5cfc87fda28"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/nusit.nus.edu.sg\/services\/hpc-newsletter\/preview-jupyterhub-hpc\/"]}]},{"@type":"WebSite","@id":"https:\/\/nusit.nus.edu.sg\/#website","url":"https:\/\/nusit.nus.edu.sg\/","name":"NUS Information Technology | NUS IT Services, Solutions & Governance","description":"Borderless University, powered by Infinite Technology","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/nusit.nus.edu.sg\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/nusit.nus.edu.sg\/#\/schema\/person\/1d48503b1ae5833c749ed5cfc87fda28","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/nusit.nus.edu.sg\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/955212ca4884ab2a06f3f581f8e497c5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/955212ca4884ab2a06f3f581f8e497c5?s=96&d=mm&r=g","caption":"admin"},"url":"https:\/\/nusit.nus.edu.sg\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/nusit.nus.edu.sg\/wp-json\/wp\/v2\/posts\/5991"}],"collection":[{"href":"https:\/\/nusit.nus.edu.sg\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nusit.nus.edu.sg\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nusit.nus.edu.sg\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nusit.nus.edu.sg\/wp-json\/wp\/v2\/comments?post=5991"}],"version-history":[{"count":0,"href":"https:\/\/nusit.nus.edu.sg\/wp-json\/wp\/v2\/posts\/5991\/revisions"}],"wp:attachment":[{"href":"https:\/\/nusit.nus.edu.sg\/wp-json\/wp\/v2\/media?parent=5991"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nusit.nus.edu.sg\/wp-json\/wp\/v2\/categories?post=5991"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nusit.nus.edu.sg\/wp-json\/wp\/v2\/tags?post=5991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}