title: Couldn't open file yolov3_custom_last.weights when trying to run darknet detection
body: <p>I've been trying to use YOLO (v3) to implement and train an object detection of Tank with <code>OpenImage</code> dataset.
  I have tried to get help from <a href="https://colab.research.google.com/drive/1Mh2HP_Mfxoao6qNFbhfV3u28tG8jAVGk" rel="nofollow noreferrer">this tutorial</a> and my code pretty much looks like it.
  Also I'm using Google Colab  and Google Drive services.
  everything is going fine through my program. But I hit an error at the final step when I'm running the <code>darknet</code> to train detection.</p>
  <pre><code>!./darknet detector train &quot;data/obj.data&quot; cfg/yolov3_custom.cfg &quot;darknet53.conv.74&quot; -dont_show
  </code></pre>
  <p>after 100 iterations, when it's trying to save the progress in the backup folder I've addressed in <code>obj.data</code> file, I get the following error:</p>
  <pre><code>Saving weights to /content/drive/My\Drive/YOLOv3/backup/yolov3_custom_last.weights
  Couldn't open file: /content/drive/My\Drive/YOLOv3/backup/yolov3_custom_last.weights
  </code></pre>
  <p>at first, I thought I made a mistake in using the address; So, I tried checking the address by using ls command</p>
  <pre><code>!ls /content/drive/My\Drive/YOLOv3/backup/
  </code></pre>
  <p>and the result was an empty folder (However, not an error meaning I've written the address correctly and that it is accessable in my google drive).</p>
  <p>Here are contents of data.object file:</p>
  <pre><code>classes = 1
  train = data/train.txt
  valid = data/test.txt
  names = data/obj.names
  backup = /content/drive/My\ Drive/YOLOv3/backup
  </code></pre>
  <p>also I've made required changes in config file so I don't think that the problem is about that. But just to make sure here are the changes I've made in my <code>yolov3.cfg</code> file:</p>
  <ol>
  <li>Fist of all we will comment lines 3 and 4 (batch, subdivisions) to unset testing mode</li>
  <li>We will uncomment lines 6 and 7(batch, subdivisions) to set to training mode</li>
  <li>We change our <code>max_batches</code> value to <strong>2000 * number_of_classes</strong> (if there's one class like our case, set to 4000)</li>
  <li>We change our step tuple-like values to 80%, 90% value of our max_baches value. In this case it will be 3200, 3600.</li>
  <li>For <strong>all</strong> YOLO layers and convoloutional layers before them, changed the <code>classes</code> value to number of classes, In this case 1, and change the value of <code>filters</code> according to following formula(In this case, 18)</li>
  </ol>
  <p><strong>Formula for conv layers filters value:</strong> (number_of_classes + 5)*3</p>
  <p>I searched the error and found <a href="https://github.com/pjreddie/darknet/issues/416" rel="nofollow noreferrer">this issue</a> on Github.
  However, I tried the following methods recommended there and the problem is still the same:</p>
  <ol>
  <li>Removing and recreating the <code>backup</code> folder</li>
  <li>Tried to adding the line  <code> backup = backup</code> in my <code>yolo.data</code> file in folder <code>.cfg</code> but there was no such file in cfg folder.</li>
  <li>Creating an empty <code>yolov3_custom_last.weights</code> in backup folder</li>
  </ol>
  <p>The other solutions mentioned in this issue was about when you are running YOLO on your PC and not google Colab.
  Also, here my tree structure of the folder YOLOv3 which is stored in my Google Drive My Drive(main folder).</p>
  <pre><code>YOLOv3
          darknet53.conv.74
          obj.data
          obj.names
          Tank.zip
          yolov3.weights
          yolov3_custom.cfg
          yolov3_custom1.cfg.txt
  </code></pre>
  <p>So, I'm kinda stuck and I have no idea what could fix this. I'd appreciate some help.</p>