<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kibrom Desta on Medium]]></title>
        <description><![CDATA[Stories by Kibrom Desta on Medium]]></description>
        <link>https://medium.com/@kibromdst?source=rss-a95ab87963ee------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Kibrom Desta on Medium</title>
            <link>https://medium.com/@kibromdst?source=rss-a95ab87963ee------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 01:17:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kibromdst/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Digital signatures]]></title>
            <link>https://medium.com/@kibromdst/digital-signatures-4aeb40b7e8e1?source=rss-a95ab87963ee------2</link>
            <guid isPermaLink="false">https://medium.com/p/4aeb40b7e8e1</guid>
            <dc:creator><![CDATA[Kibrom Desta]]></dc:creator>
            <pubDate>Thu, 05 Dec 2024 02:21:23 GMT</pubDate>
            <atom:updated>2024-12-05T02:22:53.669Z</atom:updated>
            <content:encoded><![CDATA[<p>In the NAIST lecture there is a mistake I made when i was explaining about message digest using asymmetric key algorithms. Please check the lecture video at 52:45 to Here is the correct explanation about public-key signatures.</p><p>“<em>Alice can send a signed plaintext message, P, to Bob by transmitting a plain text encrypted by her own private key first and encrypted again by Bob’s public key. When Bob received this cipher text, he transforms it using his private key, and then applies Alices public key to get the original plain text.</em>”</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4aeb40b7e8e1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dr. Kibrom has received an academic excellence award]]></title>
            <link>https://medium.com/inet-lab/inet-lab-has-received-an-academic-excellence-award-37b31155bfb0?source=rss-a95ab87963ee------2</link>
            <guid isPermaLink="false">https://medium.com/p/37b31155bfb0</guid>
            <dc:creator><![CDATA[Kibrom Desta]]></dc:creator>
            <pubDate>Sun, 26 Mar 2023 00:57:34 GMT</pubDate>
            <atom:updated>2023-03-26T01:22:29.394Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xhbpjB9D8CjrAMKq0oFarQ.jpeg" /></figure><p>My name is Kibrom, and I completed both my master’s and doctoral degrees at NAIST’s inet-lab. I’ve had the incredible experience of having to spend a significant portion of my time in the Inet-lab during the past five years. The laboratory offers a great setting for research and a wealth of materials you may utilize for your studies. I would like to thank Fujikawa sensei, Ismail sensei, Kakuichi sensei for all their support in my years in the school. With their support, I have received an award for “Academic Excellence Award” and “NAIST Academic Excellence Award” for the academic year 2022.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*i8lyYGxDYgQlHUCR-8D-8A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_X0RGGe3R-hBvylzawn8Dw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V6e2WXUgoQpfQ5h3JWevFw.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37b31155bfb0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/inet-lab/inet-lab-has-received-an-academic-excellence-award-37b31155bfb0">Dr. Kibrom has received an academic excellence award</a> was originally published in <a href="https://medium.com/inet-lab">inet-lab</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Difference between gradient descent, stochastic gradient descent, and minibatch stochastic gradient…]]></title>
            <link>https://medium.com/@kibromdst/difference-between-gradient-descent-stochastic-gradient-descent-and-minibatch-stochastic-gradient-87127216a3d0?source=rss-a95ab87963ee------2</link>
            <guid isPermaLink="false">https://medium.com/p/87127216a3d0</guid>
            <category><![CDATA[gradient-descent]]></category>
            <category><![CDATA[mini-batch-gradient]]></category>
            <category><![CDATA[stochastic-gradient]]></category>
            <dc:creator><![CDATA[Kibrom Desta]]></dc:creator>
            <pubDate>Wed, 08 Dec 2021 08:03:20 GMT</pubDate>
            <atom:updated>2021-12-08T08:03:20.598Z</atom:updated>
            <content:encoded><![CDATA[<h3>Difference between gradient descent, stochastic gradient descent, and minibatch stochastic gradient descent</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AZ-wR8OPainnDQtK" /><figcaption>Photo by <a href="https://unsplash.com/@filizelaerts?utm_source=medium&amp;utm_medium=referral">Filiz Elaerts</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>The difference between the objective function optimization algorithms can be confusing if you are a beginner to deep learning. The maths behind all the algorithms can be better understood with a TensorFlow implementation.</p><p>I have implemented a simple linear regression model that takes an input of two values and returns the squared sum of the inputs. Since solving this problem would be easy, I have also added a simple gaussian noise to the training data. That way we will see how the weights are changing in each iteration.</p><p>The following figure shows a few rows of the input values and corresponding target values of the training data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*2cD0gEfJ6q3uSSl107Qfzg.jpeg" /><figcaption>excerpt of training data. x_train has a shape of (2,1) and y_train has a shape of (1)</figcaption></figure><p>Similar to the above image, I have generated 1000 samples. Here is the code for that for both training and generating the datasets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*57AS1Nj256yVnNMCYsrS7w.png" /><figcaption>Source code</figcaption></figure><p>Now that we have implemented the training code, all we have to do is set the batch size to see the difference between all the optimizers.</p><ol><li><strong>Batch gradient descent</strong>: makes an update only once in each epoch. Hence we will set our batch size to the total training data.</li></ol><pre>gd_res = train_sgd(lr=1, batch_size=1000, num_epochs=10)</pre><p>2<strong>. Stochastic gradient descent: </strong>weight updates are made after each sample. In this case, we need to set out the batch size to 1.</p><pre>gd_res = train_sgd(lr=1, batch_size=1, num_epochs=10)</pre><p>3. minibatch stochastic gradient descent: weight updates are made after each minibatch size and this continues until all the batches are traced.</p><pre>gd_res = train_sgd(lr=1, batch_size=100, num_epochs=10)</pre><p>NB. Hope this gives you a general understanding of the different types of gradient descents, but for further understanding of the maths behind the partial derivatives, I recommend visiting a book prepared by the AWS team <a href="https://d2l.ai/index.html">https://d2l.ai/index.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=87127216a3d0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Accessing Jupyter Notebook installed on NAIST’s server.]]></title>
            <link>https://medium.com/@kibromdst/accessing-jupyter-notebook-installed-on-naists-server-7045d034480f?source=rss-a95ab87963ee------2</link>
            <guid isPermaLink="false">https://medium.com/p/7045d034480f</guid>
            <dc:creator><![CDATA[Kibrom Desta]]></dc:creator>
            <pubDate>Sat, 28 Aug 2021 18:05:40 GMT</pubDate>
            <atom:updated>2022-01-01T06:03:27.651Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YECeOxlko9KoOJNw8RNm3A.jpeg" /></figure><p>Previously I have written, <a href="https://medium.com/inet-lab/using-naist-server-gpus-for-deep-learning-anaconda-with-tensorflow-cdafbf24a8fa">Link</a>, how to submit batch jobs to NAIST’s GPU servers for computation. But before submitting big jobs to the computing servers we might want to see how our code is behaving in a small dataset. There is a post that is written in Japanese on the same topic, except I couldn’t figure it out as it is written in Japanese. Here is the blog post for that. <a href="https://keichi.dev/post/naist-cluster-tensorflow/">https://keichi.dev/post/naist-cluster-tensorflow/</a>. Hence, in this post, I will show the step-by-step methods to access Jupyter notebook installed in NAIST’s GPU server.</p><p>To follow along with this post one has to finish all the steps in my previous post, <a href="https://medium.com/inet-lab/using-naist-server-gpus-for-deep-learning-anaconda-with-tensorflow-cdafbf24a8fa">Link</a>. After finishing the first step, we need to start Jupyter notebook in NAIST server, but to do so we need to log in the pascal_intr first using the following command.</p><pre>ssh user_id<a href="/service/mailto:araya-kd@h29grid-dev0.naist.jp">@h29grid-dev0.naist.jp</a></pre><pre>cd /work/araya-kd/</pre><pre>qlogin -q pascal_intr.q </pre><p>From here on, we will continue from the steps of the previous post and start Jupyter notebook. We need to activate the environment we created on the previous post and start Jupyter notebook from inside it. Run the following commands to do so.</p><pre>bash<br>export PATH=&quot;/work/araya-kd/anaconda/bin:$PATH&quot;<br>conda activate tf_gpu_cuda8<br>conda install -c conda-forge notebook</pre><pre>jupyter-notebook --ip=0.0.0.0</pre><p>Results from running the above commands should show you as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EGSkGLXEvYqYmv61fOVhMg.png" /><figcaption>Fig: This image contains an address that can be accessed from inside NAIST</figcaption></figure><p>Open the link with h29pascal6… on the above image with your suitable browser to access Jupyter notebook. Doing so should show you a result as shown below. Well, not exactly like the attached image:), it obviously will depend on the data you have on the server but similar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6DtGtAQBTOO10_G8bqZEEw.png" /></figure><p>Now let’s check if Jupyter notebook can access the GPU server:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4KQoVLmWoFFCy0zv4SqoCA.png" /></figure><p>This is even better, it shows two GPUs, unlike the batch which only accesses one GPU.</p><p>NOTE:</p><p>After I created a new Cuda environment and installed Jupyter using ‘conda install Jupyter’, I had permission denied problems. Fixed it using the following command.</p><pre>chmod 755 /work/araya-kd/anaconda3/envs/tf_gpu_cuda8_2/bin/jupyter-notebook</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7045d034480f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Installing Tensorflow in Ubuntu 20.04 with GPU support]]></title>
            <link>https://medium.com/@kibromdst/installing-tensorflow-in-ubuntu-20-04-with-gpu-support-b90327a65122?source=rss-a95ab87963ee------2</link>
            <guid isPermaLink="false">https://medium.com/p/b90327a65122</guid>
            <dc:creator><![CDATA[Kibrom Desta]]></dc:creator>
            <pubDate>Tue, 20 Jul 2021 06:06:29 GMT</pubDate>
            <atom:updated>2021-07-20T06:06:29.899Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jt4cB8PWisWvsbqoaTUTfA.jpeg" /></figure><p>The official TensorFlow website gives a detailed explanation about the installation of TensorFlow in ubuntu 18.04. In this post, I provide you the steps that you have to follow to install TensorFlow and access the available GPUs in ubuntu 20.04.</p><p><strong>Clean previous Cuda installations</strong></p><p>Previous installations of Cuda might clash clash with the required Cuda versions for TensorFlow, therefore it would be great if we could remove all Nvidia drivers beforehand. Run the following commands to remove CUDA Toolkit, Nvidia drivers.</p><pre>sudo apt-get --purge remove &quot;*cublas*&quot; &quot;*cufft*&quot; &quot;*curand*&quot; &quot;*cusolver*&quot; &quot;*cusparse*&quot; &quot;*npp*&quot; &quot;*nvjpeg*&quot; &quot;cuda*&quot; &quot;nsight*&quot;<br>sudo apt-get --purge remove &quot;*nvidia*&quot;<br>sudo apt-get autoremove</pre><p><strong>Install Cuda</strong></p><p>CUDA 11.0 tookkit seem to work without problems in ubuntu 20.04 and hence we will be downloading this version for use. This is the <a href="https://developer.nvidia.com/cuda-11.0-update1-download-archive?target_os=Linux&amp;target_arch=x86_64&amp;target_distro=Ubuntu&amp;target_version=2004&amp;target_type=deblocal">configuration</a> for my ubuntu with the following installation instructions:</p><pre>wget <a href="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin">https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin</a><br>sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600<br>wget <a href="https://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda-repo-ubuntu2004-11-0-local_11.0.3-450.51.06-1_amd64.deb">https://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda-repo-ubuntu2004-11-0-local_11.0.3-450.51.06-1_amd64.deb</a><br>sudo dpkg -i cuda-repo-ubuntu2004-11-0-local_11.0.3-450.51.06-1_amd64.deb<br>sudo apt-key add /var/cuda-repo-ubuntu2004-11-0-local/7fa2af80.pub<br>sudo apt-get update<br>sudo apt-get -y install cuda</pre><p>Once the above installation instructions are finished copy the following three lines into your ~/.bashrc file for correct library paths.</p><pre>export PATH=/usr/local/cuda-11.0/bin${PATH:+:${PATH}} <br>export LD_LIBRARY_PATH=/usr/local/cuda-11.0/lib64:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=/usr/local/cuda-11.0/include:$LD_LIBRARY_PATH</pre><p>Reboot the system and check if the installations are correct by executing nvidia-smi command on terminal.</p><p><strong>cuDNN libraries installation</strong></p><p>Download the following three files from the official Nvidia developer portal which requires your registration or login if you have an account with Nvidia.</p><p>Library for Windows and Linux, Ubuntu(x86_64, armsbsa, PPC architecture)</p><ol><li><a href="https://developer.nvidia.com/compute/machine-learning/cudnn/secure/8.1.0.77/11.2_20210127/Ubuntu20_04-x64/libcudnn8_8.1.0.77-1+cuda11.2_amd64.deb">cuDNN Runtime Library for Ubuntu20.04 x86_64 (Deb)</a></li><li><a href="https://developer.nvidia.com/compute/machine-learning/cudnn/secure/8.1.0.77/11.2_20210127/Ubuntu20_04-x64/libcudnn8-dev_8.1.0.77-1+cuda11.2_amd64.deb">cuDNN Developer Library for Ubuntu20.04 x86_64 (Deb)</a></li><li><a href="https://developer.nvidia.com/compute/machine-learning/cudnn/secure/8.1.0.77/11.2_20210127/Ubuntu20_04-x64/libcudnn8-samples_8.1.0.77-1+cuda11.2_amd64.deb">cuDNN Code Samples and User Guide for Ubuntu20.04 x86_64 (Deb)</a></li></ol><p>chang your terminal path to the download files location and run the following three commands for installation.</p><pre>sudo dpkg -i libcudnn8_8.1.0.77-1+cuda11.2_amd64.deb  <br>sudo dpkg -i libcudnn8-dev_8.1.0.77-1+cuda11.2_amd64.deb  <br>sudo dpkg -i libcudnn8-samples_8.1.0.77-1+cuda11.2_amd64.deb</pre><p><strong>Install TensorFlow and check if GPU is being accessed from TensorFlow</strong></p><p>After installing TensorFlow the following code should give you the number of GPUs available on your ubuntu pc.</p><pre>pip install tensorflow<br>python</pre><pre>import tensorflow as tf <br>print(&quot;Num GPUs Available: &quot;, len(tf.config.experimental.list_physical_devices(&#39;GPU&#39;)))</pre><p>My output after running the above code looks like the following image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*5tOKNJ5qhJJPi-UPod6aZw.png" /></figure><p>references:</p><ul><li><a href="https://heads0rtai1s.github.io/2021/02/25/gpu-setup-r-python-ubuntu/">Installing CUDA, tensorflow, torch for R &amp; Python on Ubuntu 20.04 - head spin - the Heads or Tails blog</a></li><li><a href="https://medium.com/analytics-vidhya/installing-tensorflow-with-cuda-cudnn-gpu-support-on-ubuntu-20-04-f6f67745750a">Installing Tensorflow with CUDA &amp; cuDNN GPU support on Ubuntu 20.04</a></li><li><a href="https://medium.com/@tunguz/installing-tensorflow-on-ubuntu-20-04-bcada5a9c7e1">Installing TensorFlow on Ubuntu 20.04</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b90327a65122" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using NAIST server GPU’s for deep learning — Anaconda with TensorFlow]]></title>
            <link>https://medium.com/inet-lab/using-naist-server-gpus-for-deep-learning-anaconda-with-tensorflow-cdafbf24a8fa?source=rss-a95ab87963ee------2</link>
            <guid isPermaLink="false">https://medium.com/p/cdafbf24a8fa</guid>
            <category><![CDATA[centos7]]></category>
            <category><![CDATA[anaconda]]></category>
            <category><![CDATA[tensorflow]]></category>
            <dc:creator><![CDATA[Kibrom Desta]]></dc:creator>
            <pubDate>Fri, 08 Jan 2021 09:43:37 GMT</pubDate>
            <atom:updated>2021-01-08T12:12:38.910Z</atom:updated>
            <content:encoded><![CDATA[<h3>Using NAIST server GPU’s for deep learning — Anaconda with TensorFlow</h3><p>Installing TensorFlow in a remote server can be a hassle, but thanks to Anaconda, it makes it very easy to use. I myself had some problems setting up this environment but with the help of the internet and Assist. Prof.<br>Masatoshi Kakiuchi I have managed to set up my environment.</p><p>In this article, I will show you the step by step guide that you need to follow to set up a TensorFlow environment and how to use it together with NAIST’s GPU servers.</p><p>here are the steps:</p><ol><li>login to NAIST server with your mandara account:<em> ssh mandara-id@h29grid-dev0</em></li><li>go to the working directory: <em>cd ../../../work/mandara-id</em></li><li><a href="https://www.anaconda.com/products/individual">Download Anaconda</a> for Linux from the official website : <em>wget </em><a href="https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh"><em>https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh</em></a></li><li>Install anaconda: <em>bash</em> <em>Anaconda3–2020.11-Linux-x86_64.sh</em></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*zb6WAvw4zZiDJxIOHXZJhA.png" /><figcaption>press enter multiple times to read the license agreements — who does tho :)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/261/1*Wff5ej_DNeRwZJWrxqf6rA.png" /><figcaption>type yes and press enter when dis message comes</figcaption></figure><p>5. Select a folder where your anaconda will be installed. Mine I like to keep it in the working directory, so I will name my folder “<em>anaconda3</em>&quot;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/1*Dg54IrrEvbAaaH-euiE-1A.png" /></figure><p>6. After the installation is about to finish the anaconda will give you the following prompt, select either no or yes. It doesn’t make any difference anyway because students don’t have administrative permissions to run conda init in NAIST’s servers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*RiZI4vfpuUBPixMjmCzSHA.png" /></figure><p>7. Voila!! we have finished anaconda installation with these simple steps. Next is to create a virtual environment that we will install TensorFlow on. But we first need to change the permission of the conda so as for it to be used by all users. Here is how to do it:</p><pre>chmod 755 /work/mandara-id/anaconda3/bin/conda</pre><p><strong>Installing TensorFlow in anaconda virtual environment.</strong></p><p>We will create a new virtual environment for our TensorFlow. Follow the steps below to do so:</p><ol><li>create a virtual environment in the anaconda named ‘<em>tf_gpu_cuda8</em>’. Will use the bash to create the virtual environment and install TensorFlow on it. So, while you are still in your work directory run the following commands:</li></ol><pre>bash<br>export PATH=”/work/mandara-id/anaconda3/bin:$PATH”</pre><p>The virtual environment name can be anything, I put cuda8 in my example because GPU Tensorflow uses CUDA, and installation of Cuda is needed for this to work. The following two commands install both TensorFlow and cudatoolkit. After the installation is finished the next command activates the virtual environment.</p><pre>conda create -n tf_gpu_cuda8 tensorflow-gpu cudatoolkit<br>conda activate tf_gpu_cuda8</pre><p>2. Our next step would be to check if all the installations are up and running. we also need to make sure the NAIST’s GPU is being used whenever we submit our jobs or do interactive jobs. Let’s see if TensorFlow is accessing the GPU in the interactive server by first logging into the interactive server.</p><pre>qlogin -q grid_intr.q </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/1*uZHre0-POYYJwK367JLkTw.png" /></figure><pre>bash<br>export PATH=”/work/mandara-id/anaconda3/bin:$PATH”<br>conda activate tf_gpu_cuda8</pre><p>Let’s run the following TensorFlow code in a python shell:</p><pre>import tensorflow as tf<br>print(&quot;Num GPUs Available: &quot;, len(tf.config.experimental.list_physical_devices(&#39;GPU&#39;)))</pre><p>If running the above python script results as follows with “<em>Num GPUs Available: 1</em>”. Then you are good to go and everything is set up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/821/1*DYFJlpkQpQdM8-OZrlrtuA.png" /></figure><p><strong>Running batch jobs in NAIST cluster servers</strong></p><p>Running your programs using an interactive server is a bit easier than batch jobs, but it comes short when the processing time is more than 10hours. The interactive servers can only be used for a short time. If we want to use the NAIST servers for a longer, say 1000 hours as in grid_short.q, we need to submit batch jobs to the cluster node.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*o86F3d5u3jFzceTMBy4oOw.png" /></figure><p>Follow the following steps to submit batch jobs on one of the above cluster nodes:</p><ol><li>create a folder for the programs and bash scripts, I will name the folder ‘batch_job’, and place it in your working directory. The folder contains a bash script, <em>check_tf.sh</em>, and a python script, <em>check_tf.py</em>. The contents of the two files is shown below:</li></ol><p><em>check_tf.sh</em></p><pre><strong>#!/bin/bash<br></strong>#$ -S /bin/bash<br>#$ -cwd<br>#$ -V<br>export PATH=&quot;/work/mandara-id/anaconda3/bin:$PATH&quot;<br>source activate tf_gpu_cuda8<br>cd /work/mandara-id/batch_job<br>python3 check_tf.py</pre><p><em>check_tf.py</em></p><pre>import tensorflow as tf<br>print(&quot;Num GPUs Available: &quot;, len(tf.config.experimental.list_physical_devices(&#39;GPU&#39;)))</pre><p>2. Submitting the batch job is done with the following scripts:</p><pre>qsub -q grid_low.q check_tf.sh</pre><p>running the above script will create two files. The first file which ends with an extension of,<em>*.sh.e*</em>, will contain the run-time errors in your programs if there are any. And the second *.sh.o* will contain the outputs of your script if your program runs without errors. My outputs are as follows :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*kLQfqCAj5wXJdaZJb7VjAg.png" /><figcaption>checking_tf.sh.e343445</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/1*cf7dCKZ_3zBwYt0w0iRjQQ.png" /><figcaption>checking_tf.sh.o343445</figcaption></figure><p>If you follow the steps, you will get results like mine and GPU should be accessible. Congratulation and happy research.</p><p>N.B: In the whole description mandara-id refers to your mandara ID and should be replaced with your mandara ID.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cdafbf24a8fa" width="1" height="1" alt=""><hr><p><a href="https://medium.com/inet-lab/using-naist-server-gpus-for-deep-learning-anaconda-with-tensorflow-cdafbf24a8fa">Using NAIST server GPU’s for deep learning — Anaconda with TensorFlow</a> was originally published in <a href="https://medium.com/inet-lab">inet-lab</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>