You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ritvd
changed the title
where did you upload the hdf5 files in your drive?
AttributeError: 'numpy.ndarray' object has no attribute 'decode'
Jun 30, 2022
This happens here:
import torchvision.transforms as T
device = torch.device("cuda")
transform = T.Compose([
T.ToTensor()])
tokenizer = Tokenizer(charset_base)
train_loader = torch.utils.data.DataLoader(DataGenerator(source_path,charset_base,max_text_length,'train',transform), batch_size=batch_size, shuffle=False, num_workers=2)
val_loader = torch.utils.data.DataLoader(DataGenerator(source_path,charset_base,max_text_length,'valid',transform), batch_size=batch_size, shuffle=False, num_workers=2)
The error I get is:
self.dataset[self.split]['gt'] = [x.decode() for x in self.dataset[self.split]['gt']]
AttributeError: 'numpy.ndarray' object has no attribute 'decode' #18
The text was updated successfully, but these errors were encountered: