Speech-enhancement
Speech-enhancement copied to clipboard
TypeError: Cannot handle this data type
hello, I have a problem and want to ask a question. I started main.py without modifying the code, but I got an error. I need advice on where to fix it.
Thank you
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/PIL/Image.py", line 2428, in fromarray mode, rawmode = _fromarray_typemap[typekey] KeyError: ((1, 1, 129), '|u1')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/khl/Desktop/prj_dir/SE/main.py", line 89, in
Hello, I had the same issue and I used np.transpose() to solve it. You're going to need to use it for all mentions of writer.add_image().
writer.add_image(name + '_spectrogram_ref' + '/clean', np.transpose(clean_S), itr) writer.add_image(name + '_spectrogram_ref' + '/noisy', np.transpose(noisy_S), itr).
I Hope this helps!
Thank you for your reply. I figure out that that error is from version difference of TensorboardX. I'll fix that part, soon.
Dear,
How to set the validation set ? Please help me. Thx
and
writer.add_image(name + '_spectrogram_enhanced' + '/enhanced', enhanced_S, itr) # image_shape = (C, H, W) in the same py file
also need np.transpose ?
I will try both.
just modify the two
writer.add_image(name + '_spectrogram_ref' + '/clean', np.transpose(clean_S), itr) # image_shape = (C, H, W)
writer.add_image(name + '_spectrogram_ref' + '/noisy', np.transpose(noisy_S), itr) # image_shape = (C, H, W)
also has the same question
I will try the second
modify all the three writer.add_image
writer.add_image(name + '_spectrogram_enhanced' + '/enhanced', np.transpose(enhanced_S), itr) # image_shape = (C, H, W)