You are absolutely right, I can’t reach overfitting even with 10 samples dataset, i just tried feedforfard nn, the same result. May be there is problem with format of data I feed to nn…
can you please have a look?
This is how I load data to notebook, initially my files are stored in separate txt.files:
class myDatasetTrain(Dataset):
    def __init__(self):
    path = "...' 
    all_files = glob.glob(os.path.join(path, "*trn.ssv")) 
    frame_train = pd.DataFrame()
    list_ = []
    for file_ in all_files:
        df = pd.read_csv(file_,index_col=None, sep='\s+', header=None)
        list_.append(df)
        frame_train = pd.concat(list_)

    self.len=frame_train.shape[0]

self.x=torch.from_numpy(pd.DataFrame(scaler.fit_transform(frame_train.iloc[:,:-1])).as_matrix()).float()
self.y=torch.from_numpy(frame_train.iloc[:,-1].replace(255, 1).values).long()
def getitem(self, index):
return self.x[index],self.y[index]
def len(self):
return self.len
batch_size = 1
train_data=myDatasetTrain()
class_sample_counts=[1871,229]
weights = 1. / torch.tensor(class_sample_counts, dtype=torch.float)
samples_weights = weights[train_data.y]

sampler = torch.utils.data.sampler.WeightedRandomSampler(
weights=samples_weights,
num_samples=len(samples_weights),
replacement=True)

train_loader = DataLoader(dataset=train_data,sampler=sampler, batch_size=batch_size, drop_last=True)

And this is what I get when print from train_loader:
for d,t in train_loader:
print(‘d’,d)
print(‘t’,t)
d tensor([[-1.0678, -1.0603, -0.8322, -1.0248,  0.8292,  0.7950,  0.5398,  0.8180,
-0.4322, -0.0671,  0.9796, -0.4490,  0.1750,  0.1924,  0.1636,  0.2060]])
t tensor([1])
d tensor([[ 1.1501,  1.0182,  0.8165,  0.8637, -1.0991, -0.9765, -0.8587, -0.9004,
1.3153,  0.8916,  0.4266,  0.9797, -0.9870, -0.9993, -1.0128, -1.0002]])
t tensor([0])
d tensor([[ 0.2682,  0.1219,  0.1722,  0.1781, -0.4644, -0.3578, -0.4453, -0.4443,
0.4593,  0.2648,  0.6636,  0.6395, -1.1267, -1.0854, -1.0255, -1.0883]])
t tensor([1])
d tensor([[ 0.2682,  0.1219,  0.1722,  0.1781, -0.4644, -0.3578, -0.4453, -0.4443,
0.4593,  0.2648,  0.6636,  0.6395, -1.1267, -1.0854, -1.0255, -1.0883]])
t tensor([1])
d tensor([[ 0.2682,  0.1219,  0.1722,  0.1781, -0.4644, -0.3578, -0.4453, -0.4443,
0.4593,  0.2648,  0.6636,  0.6395, -1.1267, -1.0854, -1.0255, -1.0883]])
t tensor([1])