I am trying to train a 3D resnet-18 \ resnet-34 \ resnet-50 model similar to the model in here:

  
      github.com
  
  
    kenshohara/3D-ResNets-PyTorch/blob/master/models/resnet.py
import math
from functools import partial

import torch
import torch.nn as nn
import torch.nn.functional as F


def get_inplanes():
    return [64, 128, 256, 512]


def conv3x3x3(in_planes, out_planes, stride=1):
    return nn.Conv3d(in_planes,
                     out_planes,
                     kernel_size=3,
                     stride=stride,
                     padding=1,
                     bias=False)



  This file has been truncated. show original

  
  
    
    
  
  


Yet I want to use the largest image I can fit in 8 - GB of GPU RAM (Nvidia RTX 2080).
it there a quick way to figure out this rather than just trying? I have tried images of size 646464 and it worked. yet I just need to know what is the largest size I can do
thank you