<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.cs.earlham.edu/index.php?action=history&amp;feed=atom&amp;title=Deep_Learning_Workflow</id>
	<title>Deep Learning Workflow - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.cs.earlham.edu/index.php?action=history&amp;feed=atom&amp;title=Deep_Learning_Workflow"/>
	<link rel="alternate" type="text/html" href="https://wiki.cs.earlham.edu/index.php?title=Deep_Learning_Workflow&amp;action=history"/>
	<updated>2026-08-10T03:35:46Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.cs.earlham.edu/index.php?title=Deep_Learning_Workflow&amp;diff=18231&amp;oldid=prev</id>
		<title>Ctknight22: Updated Machine learning wiki RAHHH</title>
		<link rel="alternate" type="text/html" href="https://wiki.cs.earlham.edu/index.php?title=Deep_Learning_Workflow&amp;diff=18231&amp;oldid=prev"/>
		<updated>2025-05-05T13:43:46Z</updated>

		<summary type="html">&lt;p&gt;Updated Machine learning wiki RAHHH&lt;/p&gt;
&lt;a href=&quot;https://wiki.cs.earlham.edu/index.php?title=Deep_Learning_Workflow&amp;amp;diff=18231&amp;amp;oldid=18082&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Ctknight22</name></author>
	</entry>
	<entry>
		<id>https://wiki.cs.earlham.edu/index.php?title=Deep_Learning_Workflow&amp;diff=18082&amp;oldid=prev</id>
		<title>Ttphan21 at 18:28, 26 November 2022</title>
		<link rel="alternate" type="text/html" href="https://wiki.cs.earlham.edu/index.php?title=Deep_Learning_Workflow&amp;diff=18082&amp;oldid=prev"/>
		<updated>2022-11-26T18:28:52Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:28, 26 November 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l104&quot;&gt;Line 104:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 104:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;We have set up a jupyterhub instance on layout that is designed to support DL projects. (Link: https://lo0.cluster.earlham.edu/jupyterhub) It comes prepackaged with cuda10.1, tf2.3.1, py3.7 -&amp;gt; it automatically runs the tensorflow projects on the available GPUs. Just to make sure everything�s set up correctly, use this python script:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;We have set up a jupyterhub instance on layout that is designed to support DL projects. (Link: https://lo0.cluster.earlham.edu/jupyterhub) It comes prepackaged with cuda10.1, tf2.3.1, py3.7 -&amp;gt; it automatically runs the tensorflow projects on the available GPUs. Just to make sure everything�s set up correctly, use this python script:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;tf.config.list_physical_devices(&amp;#039;GPU&amp;#039;)&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;tf.config.list_physical_devices(&amp;#039;GPU&amp;#039;)&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Tested and working 2022&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ttphan21</name></author>
	</entry>
	<entry>
		<id>https://wiki.cs.earlham.edu/index.php?title=Deep_Learning_Workflow&amp;diff=17748&amp;oldid=prev</id>
		<title>Dkvart17: Dkvart17 moved page DeepLearningWorkflow to Deep Learning Workflow without leaving a redirect</title>
		<link rel="alternate" type="text/html" href="https://wiki.cs.earlham.edu/index.php?title=Deep_Learning_Workflow&amp;diff=17748&amp;oldid=prev"/>
		<updated>2021-01-11T20:35:04Z</updated>

		<summary type="html">&lt;p&gt;Dkvart17 moved page &lt;a href=&quot;/index.php?title=DeepLearningWorkflow&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;DeepLearningWorkflow (page does not exist)&quot;&gt;DeepLearningWorkflow&lt;/a&gt; to &lt;a href=&quot;/index.php/Deep_Learning_Workflow&quot; title=&quot;Deep Learning Workflow&quot;&gt;Deep Learning Workflow&lt;/a&gt; without leaving a redirect&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:35, 11 January 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Dkvart17</name></author>
	</entry>
	<entry>
		<id>https://wiki.cs.earlham.edu/index.php?title=Deep_Learning_Workflow&amp;diff=17747&amp;oldid=prev</id>
		<title>Dkvart17: Created page with &quot;==Where to store data?== For your project to be successful, it is critical that you have the ability to iterate over the training process in a timely manner. One thing you sho...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.cs.earlham.edu/index.php?title=Deep_Learning_Workflow&amp;diff=17747&amp;oldid=prev"/>
		<updated>2021-01-11T20:32:48Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Where to store data?== For your project to be successful, it is critical that you have the ability to iterate over the training process in a timely manner. One thing you sho...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Where to store data?==&lt;br /&gt;
For your project to be successful, it is critical that you have the ability to iterate over the training process in a timely manner. One thing you should make sure of is that reading the data is not costly.&lt;br /&gt;
&lt;br /&gt;
Your directory is a very bad place to store your data for a simple reason: user directories are not stored on the local disk of every machine, they are mounted via NFS over the network. Transferring data over the network is much, much slower than reading it from the disk (keep in mind that you also have to first read data from the disk, in order to send it over the network).&lt;br /&gt;
&lt;br /&gt;
In order to avoid this pitfall, simply put the data on the local disk. /mounts is a standard directory we�ve been putting data. If you don�t have access to this directory, just shoot an email to sysadmins and we will help you out.&lt;br /&gt;
&lt;br /&gt;
==GPU==&lt;br /&gt;
Deep learning has been around for almost half a century, but only recently it has become a prevalent machine learning method. The popularity of deep learning has risen dramatically since the 2000s and it was due to two main factors: &lt;br /&gt;
*Mass digitization provided computer scientists with a ton of data that is necessary to train models that generalize well. &lt;br /&gt;
*The computation power has become cheaper and more accessible. Especially with the arrival of GPUs, training the models has become faster than ever. You too have to leverage these two factors to make sure your project is successful.&lt;br /&gt;
&lt;br /&gt;
===GPU vs CPU===&lt;br /&gt;
The majority of the work done by neural networks is just matrix multiplication. This operation is highly parallelizable and GPUs are designed for parallel processing of the data. Let&amp;#039;s conduct an experiment to demonstrate how much faster GPUs are when it comes to training neural networks. I will train a simple CNN on digit classification.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from tensorflow.keras.datasets import mnist&lt;br /&gt;
import os&lt;br /&gt;
os.environ[&amp;quot;CUDA_VISIBLE_DEVICES&amp;quot;] = &amp;quot;-1&amp;quot; #if commented, runs on GPU, otherwise CPU&lt;br /&gt;
import tensorflow as tf&lt;br /&gt;
from tensorflow.keras import Sequential, datasets, layers, models&lt;br /&gt;
train_X, train_y), (test_X, test_y) = mnist.load_data()&lt;br /&gt;
height = train_X.shape[1]&lt;br /&gt;
width = train_X.shape[2]&lt;br /&gt;
num_classes = 10&lt;br /&gt;
model = Sequential([&lt;br /&gt;
  layers.experimental.preprocessing.Rescaling(1./255, input_shape=(height, width,1)),&lt;br /&gt;
  layers.Conv2D(32, 3, padding=&amp;#039;same&amp;#039;, activation=&amp;#039;relu&amp;#039;),&lt;br /&gt;
  layers.MaxPooling2D(),&lt;br /&gt;
  layers.Conv2D(64, 3, padding=&amp;#039;same&amp;#039;, activation=&amp;#039;relu&amp;#039;),&lt;br /&gt;
  layers.MaxPooling2D(),&lt;br /&gt;
  layers.Conv2D(128, 3, padding=&amp;#039;same&amp;#039;, activation=&amp;#039;relu&amp;#039;),&lt;br /&gt;
  layers.MaxPooling2D(),&lt;br /&gt;
  layers.Flatten(),&lt;br /&gt;
  layers.Dense(256, activation=&amp;#039;relu&amp;#039;),&lt;br /&gt;
  layers.Dense(num_classes)&lt;br /&gt;
])&lt;br /&gt;
model.compile(optimizer=&amp;#039;adam&amp;#039;,&lt;br /&gt;
              loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True),&lt;br /&gt;
              metrics=[&amp;#039;accuracy&amp;#039;])&lt;br /&gt;
epochs=10&lt;br /&gt;
import time&lt;br /&gt;
start = time.time()&lt;br /&gt;
history = model.fit(&lt;br /&gt;
  train_X,&lt;br /&gt;
  train_y,&lt;br /&gt;
  epochs=epochs,&lt;br /&gt;
  batch_size=64&lt;br /&gt;
)&lt;br /&gt;
end=time.time()&lt;br /&gt;
print(&amp;quot;Time taken:&amp;quot;,end-start)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Results&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
CPU with 16 cores: 188.98 s&lt;br /&gt;
&lt;br /&gt;
GPU: 54.0 s&lt;br /&gt;
&lt;br /&gt;
As you can see I achieved 3.5x acceleration using GPU, even though I was using all 16 CPU cores.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Setting up environment for GPU===&lt;br /&gt;
Layout is a good place to do machine learning projects. We will be adding GPUs to other machines soon so this info might change.&lt;br /&gt;
One way to check the specs of gpu is to run the command :&lt;br /&gt;
:&amp;lt;pre&amp;gt; $ lshw -C display &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On layout this outputs:&lt;br /&gt;
&lt;br /&gt;
:description: VGA compatible controller&lt;br /&gt;
:product: GK110 [GeForce GTX 780]&lt;br /&gt;
:vendor: NVIDIA Corporation&lt;br /&gt;
:physical id: 0&lt;br /&gt;
:bus info: pci@0000:03:00.0&lt;br /&gt;
:version: a1&lt;br /&gt;
:width: 64 bits&lt;br /&gt;
:clock: 33MHz&lt;br /&gt;
:capabilities: pm msi pciexpress vga_controller bus_master cap_list rom&lt;br /&gt;
:configuration: driver=nvidia latency=0&lt;br /&gt;
:resources: irq:181 memory:de000000-deffffff memory:d0000000-d7ffffff memory:d8000000-d9ffffff&lt;br /&gt;
:ioport:8000(size=128) memory:df000000-df07ffff&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Depending on the model and the make of GPU other commands might also be available. For example, for nvidia gpus you can display the info about the current state of GPU using the command:&lt;br /&gt;
&amp;lt;pre&amp;gt; $ nvidia-smi&amp;lt;/pre&amp;gt; &lt;br /&gt;
(Note: you can use this command to see whether or not the resources are busy).&lt;br /&gt;
&lt;br /&gt;
The way we manage different software versions and environments is through Modules. You can display the available modules via command: &lt;br /&gt;
module avail&lt;br /&gt;
If you run this command on layout you will see different versions of python, conda and cuda modules. Different python versions have different tensorflow versions installed.&lt;br /&gt;
&lt;br /&gt;
You can see tensorflow�s compatibility chart with python, cuda and cudnn here: https://www.tensorflow.org/install/source#gpu&lt;br /&gt;
&lt;br /&gt;
The latest version of tensorflow (2.3.1) is available on python/3.7 and it�s compatible with cuda/10.1.&lt;br /&gt;
&lt;br /&gt;
If you are planning to use this version of tensorflow, then simply run these two commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;$module load python/3.7&lt;br /&gt;
$module load cuda/10.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Jupyter==&lt;br /&gt;
&lt;br /&gt;
It�s very convenient to run DL/ML projects on python notebooks for multiple reasons. It�s easier to visualize the data, you can make changes on the fly, it helps you to make sure everything is set up correctly before you start running lengthy experiments, etc. &lt;br /&gt;
&lt;br /&gt;
We have set up a jupyterhub instance on layout that is designed to support DL projects. (Link: https://lo0.cluster.earlham.edu/jupyterhub) It comes prepackaged with cuda10.1, tf2.3.1, py3.7 -&amp;gt; it automatically runs the tensorflow projects on the available GPUs. Just to make sure everything�s set up correctly, use this python script:&lt;br /&gt;
&amp;lt;pre&amp;gt;tf.config.list_physical_devices(&amp;#039;GPU&amp;#039;)&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dkvart17</name></author>
	</entry>
</feed>