Bringing-Old-Photos-Back-to-Life icon indicating copy to clipboard operation
Bringing-Old-Photos-Back-to-Life copied to clipboard

Fix the the type cast error, issue #214

Open ruanqizhen opened this issue 3 years ago • 5 comments

Without the change, there will be an error: numpy.core._exceptions.UFuncTypeError: Cannot cast ufunc 'multiply' output from dtype('float64') to dtype('uint8') with casting rule 'same_kind'

ruanqizhen avatar Jan 06 '22 00:01 ruanqizhen

This same fix worked when using --HR if the change is also made here

https://github.com/microsoft/Bringing-Old-Photos-Back-to-Life/blob/bce7d626d6af148b68c01d16dfa7e0fe349b779b/Face_Detection/align_warp_back_multiple_dlib_HR.py#L217-L219

qcasey avatar Jan 07 '22 21:01 qcasey

CLA assistant check
All CLA requirements met.

ghost avatar Jan 07 '22 23:01 ghost

A better way is to use the numpy functions to explicitly specify an unsafe cast. This will ensure that change in the operator support will not affect the behaviour. https://github.com/numpy/numpy/issues/7225#issuecomment-223218486

the-c0d3br34k3r avatar Jan 27 '22 21:01 the-c0d3br34k3r

hello,EXCUSE ME,when I run the training code,I don't know where to find the file for training VAE_B_scratch weights, could you please share with me? I'm looking forward to your reply.Thank you.

hello,EXCUSE ME,when I run the training code,I don't know where to find the file for training VAE_B_scratch weights, could you please share with me? I'm looking forward to your reply.Thank you.

CodeMadUser avatar Jun 30 '22 14:06 CodeMadUser

hello,EXCUSE ME,when I run the training code,I don't know where to find the file for training VAE_B_scratch weights, could you please share with me? I'm looking forward to your reply.Thank you.

hello,EXCUSE ME,when I run the training code,I don't know where to find the file for training VAE_B_scratch weights, could you please share with me? I'm looking forward to your reply.Thank you.

CodeMadUser avatar Jun 30 '22 14:06 CodeMadUser