Open JWHennessey opened 7 years ago
You could encode this using a graph, with edges between the image pixels and coefficients. This is an explicit encoding of WHK different edges; there isn't a natural implicit connectivity between two completely separate domains: what did the code that gave you a compile-time error look like?
In the current version of Opt, you may need to explicitly pack in the coefficients with the image as an extra row, and use a mask image to distinguish between the two for pixel-wise regularization; it won't be too far in the future when this extra step won't be necessary and we'll just launch separate kernels for separate dimensional kernels.
An alternative, which may end up being much faster depending on your energy function, is to do an alternating solve, where you swap between treating the images as unknowns and the coefficients as unknowns; but you still need explicit connectivity for the coefficient-as-unknowns half, so that is likely a net loss.
Have you solved the problem how to use unknowns of different dimensions?
Hi, still enjoying Opt but have some confusion how to add the next bit of complexity to my problem. Again what I have in mind might just be a feature request.
I have two unknown arrays of WxH, I also want to have a vector of K unknowns (e.g. spherical harmonics coefficients) but I get a compile time error when trying to use unknowns of varying dimensions.
I've been trying to think how Opt's other tools could help e.g. multi-pass optimization or the graph data structure, but I can't get around having different dimensions. I also don't understand how you actually implement the mixed domain energies described in Section 7 Domains [Devito et. al 2016]
The best I've come up is use K WxH unknowns with a very high smoothness constraint to try and force them to be uniform but this is less than ideal.
Is there something else that Opt offers to help with this kind of problem? Thanks!