You cannot pass the Dataset instance directly to your model, but would have to pass data batches to it.
The recommended way to do this is to wrap your dataset in a DataLoader and iterate over it:
dataset = MyDataset(...)
loader = DataLoader(
    dataset,
    batch_size=1,
    shuffle=True,
    num_workers=2
)

for data in loader:
    output = model(data)
    ...

Note that I just set some arguments while creating the DataLoader, so you might want to change e.g. the batch size etc.