Automating Ablation Studies of Deep Learning Models using Batch Script
<p>In this article, we will look at a short example of how we can automate running ablation study experiments on our deep learning models using batch scripts in Windows.</p>
<blockquote>
<p>Step 1</p>
</blockquote>
<p>Create a <strong><em>.bat</em></strong> file in your editor</p>
<blockquote>
<p>Step 2: Identify the hyper-parameters you want to sweep over in your experiments</p>
</blockquote>
<p>For this article, let us consider the hyper-parameter to be λ. Also, we would like to see the effect of batch size for each λ value.</p>
<pre>
@echo off
setlocal EnableDelayedExpansion
set lambda=2 10 50 100
set bs=128 256 512
set /a exprun = 1
for %%i in (%lambda%) do (
for %%j in (%bs%) do (
echo lambda=%%i/100
echo bs=%%j
set /a exprun=!exprun!+1
echo !exprun!
python train.py --lambda %%i --bs %%j --run !exprun!
)
)
endlocal</pre>
<p>In the above code, we pass the arguments <strong><em>lambda</em></strong> and <strong><em>bs</em></strong> to the python file <strong><em>trian.py</em></strong> and also increment our experiment number counter <strong><em>exprun.</em></strong></p>
<p><a href="https://medium.com/the-owl/automating-ablation-studies-of-deep-learning-models-using-batch-script-968981870329"><strong>Read More</strong></a></p>