Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question for inverse transform #5

Open
RenYang-home opened this issue Jul 23, 2020 · 1 comment
Open

Question for inverse transform #5

RenYang-home opened this issue Jul 23, 2020 · 1 comment

Comments

@RenYang-home
Copy link

Hi,

Thanks for your codes. May I have a question in tfwavelets.nodes.dwt2d. In the case that level = 1,
last_level = tf.slice(input_node, [0, 0, 0], [first_m, first_n, 1]) has the shape of m // 2, n // 2;
but detail_tr = tf.slice(input_node, [local_m // 2, 0, 0], [local_n // 2, local_m // 2, 1]) has the shape of n // 2, m // 2; and it leads to an error in the following concatenate: upper_half = tf.concat([last_level, detail_tr], 0)?

Thanks a lot

@RenYang-home
Copy link
Author

Hi,

I switched the order of m and n, and it works now:

    detail_tr = tf.slice(input_node, [local_m // 2, 0, 0],
                         [local_m // 2, local_n // 2, 1])
    detail_bl = tf.slice(input_node, [0, local_n // 2, 0],
                         [local_m // 2, local_n // 2, 1])
    detail_br = tf.slice(input_node, [local_m // 2, local_n // 2, 0],
                         [local_m // 2, local_n // 2, 1])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant