title: fast.ai not using the GPU
body: <p>When I run training using fast.ai only the CPU is used even though</p>
  <pre><code>import torch; print(torch.cuda.is_available())
  </code></pre>
  <p>shows that CUDA is available and some memory on the GPU is occupied by my training process.</p>
  <pre><code>from main import DefectsImagesDataset
  from fastai.vision.all import *
  import numpy as np
  
  NUM_ELEMENTS = 1e5
  CSV_FILES = {
      'events_path':
          './data/events.csv',
      'defects_path':
          './data/defects2020_all.csv',
      }
  
  defects_dataset = DefectsImagesDataset(CSV_FILES['defects_path'], CSV_FILES['events_path'], NUM_ELEMENTS, window_size=10000)
  model = models.resnet34
  BATCH_SIZE = 16
  NUMBER_WORKERS = 8
  dls = DataLoaders.from_dsets(defects_dataset, defects_dataset, bs=BATCH_SIZE, num_workers=NUMBER_WORKERS)
  
  import torch; print(torch.cuda.is_available())
  
  loss_func = nn.CrossEntropyLoss()
  learn = cnn_learner(dls, models.resnet34, metrics=error_rate, n_out=30, loss_func=loss_func)
  
  learn.fit_one_cycle(1)
  
  </code></pre>
  <p>CUDA-Version: 11.5</p>
  <p>Fast.ai-Version: 2.5.3</p>
  <p>How can I make fast.ai use the GPU?</p>