SingingVoiceConversion icon indicating copy to clipboard operation
SingingVoiceConversion copied to clipboard

AttributeError: 'Dataset' object has no attribute ~ issues

Open Eunsik-Shin opened this issue 2 years ago • 0 comments

on train.py, line 22~

class SongDataset(Dataset): def init(self, filename): self.data = h5py.File(filename, 'r') self.song = self.data.get("song").value self.x = self.song.reshape((-1, 1, 64, 94)) self.len = self.x.shape[0]

def __getitem__(self, index):
    return self.x[index]

def __len__(self):
    return self.len

I get <AttributeError: 'Dataset' object has no attribute 'value'> for ".value", and <AttributeError: 'Dataset' object has no attribute 'reshape'> for ".reshape".

How can I fix this problems??

Eunsik-Shin avatar Aug 27 '21 14:08 Eunsik-Shin