Open donghyunyoo opened 6 years ago
do you resolve it, I face similar problem src_flat_cov_eye = src_norm @ src_norm.t() + Variable(torch.eye(3).cuda())
Yes. In my case, I resolved it with this modification. src_flat_nrom_trans = matSqrt(dst_flat_cov_eye) matSqrt(src_flat_cov_eye).inverse() src_norm
which file do you modify? @donghyunyoo
the paper said support "Brush Stroke Size Control." do you know how to evaluate in different brush stroke size @donghyunyoo
@suke27 did you solve it?
src_flat_cov_eye = src_norm @ src_norm.t() + Variable(torch.eye(3).cuda())
not yet
@donghyunyoo I make the same modification as you, but then a new error occurs as follow: RuntimeError: The size of tensor a (3) must match the size of tensor b (655360) at non-singleton dimension 1 Did you ever encounter this error? I don't know if I could change the data formation of this script.
@gwenguo090006 I just ran into the same error, which seems to originate from the latest commit (didn't have any error before that).
The error comes from utils.color_match
that is now used right before saving the output in main.py
.
A quick fix is for now to comment out line 258 in main.py
:
output = utils.color_match(output, style_v)
It seems to work for me
@LoicEm
yes, your solution is feasible. And then I step into the color_match
function, I think it is used to render the output image further. The error occurs when the multiplication between two matrices . I don't know why this happened, I don' think it's a confusion of the author between element product and matrix product. But when I modify the element product to matrix product, it works. However, the result is a little different from the case when you just comment out line 258 but it's also a style-transfer result of the original image.
I got this error.
Traceback (most recent call last): File "main.py", line 290, in
main()
File "main.py", line 45, in main
evaluate(args)
File "main.py", line 258, in evaluate
output = utils.color_match(output, style_v)
File "/media/hdd1/donghyun/armor/PyTorch-Multi-Style-Transfer/experiments/utils.py", line 150, in color_match
src_flat_nrom_trans = matSqrt(dst_flat_cov_eye) matSqrt(src_flat_cov_eye).inverse src_norm
RuntimeError: mul() received an invalid combination of arguments - got (builtin_function_or_method), but expected one of:
How can I fix this?