Chess_with_AI / src /chess_ML /dataset.py
ncn2569's picture
initial deploy
53b9b08
raw
history blame contribute delete
266 Bytes
from torch.utils.data import Dataset
class ChessDataset(Dataset):
def __init__(self, X, y):
self.X = X
self.y = y
def __len__(self):
return len(self.X)
def __getitem__(self, idx):
return self.X[idx], self.y[idx]