Skip to content

Cannot handle this data type: (1, 1, 260), |u1 #44

Description

@SumanthStark

Traceback (most recent call last):
File "C:\Users\suman\OneDrive\Documents\StackGan-2\code\main.py", line 144, in
algo.train()
File "C:\Users\suman\OneDrive\Documents\StackGan-2\code\trainer.py", line 756, in train
save_img_results(self.imgs_tcpu, self.fake_imgs, self.num_Ds,
File "C:\Users\suman\OneDrive\Documents\StackGan-2\code\trainer.py", line 207, in save_img_results
sup_real_img = summary.image('real_img', real_img_set).convert('RGB')
File "C:\Users\suman\AppData\Local\Programs\Python\Python310\lib\site-packages\tensorboardX\summary.py", line 287, in image
image = make_image(tensor, rescale=rescale)
File "C:\Users\suman\AppData\Local\Programs\Python\Python310\lib\site-packages\tensorboardX\summary.py", line 329, in make_image
image = Image.fromarray(tensor)
File "C:\Users\suman\AppData\Local\Programs\Python\Python310\lib\site-packages\PIL\Image.py", line 2955, in fromarray
raise TypeError("Cannot handle this data type: %s, %s" % typekey) from e
TypeError: Cannot handle this data type: (1, 1, 260), |u1

This line is causing the error --> sup_real_img = summary.image('real_img', real_img_set)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions