def buildDataLoader(*tensors, TorchDataSetType, oSamplerType=None, **Args):
    if (Args.get('DatasetArgs') != None):
        DataSetArgs = Args['DatasetArgs']
        dataset = TorchDataSetType(*tensors, **DataSetArgs)
    else:
        dataset = TorchDataSetType(*tensors)
    if (Args.get('DataLoaderArgs') != None):
        DataLoaderArgs = Args['DataLoaderArgs']
        if ((oSamplerType == None) or (Args.get('SamplerArgs') == None)):
            dataLoader = torch.utils.data.DataLoader(dataset, **DataLoaderArgs)
        else:
            SamplerArgs = Args.get('SamplerArgs')
            oSampler = oSamplerType(dataset, **SamplerArgs)
            dataLoader = torch.utils.data.DataLoader(dataset, sampler=oSampler, **DataLoaderArgs)
    else:
        dataLoader = torch.utils.data.DataLoader(dataset)
    return dataLoader
def buildDataLoader(*tensors, TorchDataSetType, oSamplerType=None, **Args):
    if (Args.get('DatasetArgs') != None):
        DataSetArgs = Args['DatasetArgs']
        dataset = TorchDataSetType(*tensors, **DataSetArgs)
    else:
        dataset = TorchDataSetType(*tensors)
    if (Args.get('DataLoaderArgs') != None):
        DataLoaderArgs = Args['DataLoaderArgs']
        if ((oSamplerType == None) or (Args.get('SamplerArgs') == None)):
            dataLoader = torch.utils.data.DataLoader(dataset, **DataLoaderArgs)
        else:
            SamplerArgs = Args.get('SamplerArgs')
            oSampler = oSamplerType(dataset, **SamplerArgs)
            dataLoader = torch.utils.data.DataLoader(dataset, sampler=oSampler, **DataLoaderArgs)
    else:
        dataLoader = torch.utils.data.DataLoader(dataset)
    return dataLoader