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

slow graph building when d value if big #12

Open
madnavs opened this issue May 2, 2018 · 0 comments
Open

slow graph building when d value if big #12

madnavs opened this issue May 2, 2018 · 0 comments

Comments

@madnavs
Copy link

madnavs commented May 2, 2018

In the file model_rn.py, can we have a better way to implement this double for loop? to speedup graph generation.

for i in range(d*d):
                   o_i = conv_4[:, int(i / d), int(i % d), :]
                   o_i = concat_coor(o_i, i, d)
                   for j in range(d*d):
                       o_j = conv_4[:, int(j / d), int(j % d), :]
                       o_j = concat_coor(o_j, j, d)
                       if i == 0 and j == 0:
                           g_i_j = g_theta(o_i, o_j, q, reuse=False)
                       else:
                           g_i_j = g_theta(o_i, o_j, q, reuse=True)
                       all_g.append(g_i_j)
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