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

Improve Performance #1

Open
Joemgu7 opened this issue May 7, 2022 · 2 comments
Open

Improve Performance #1

Joemgu7 opened this issue May 7, 2022 · 2 comments

Comments

@Joemgu7
Copy link

Joemgu7 commented May 7, 2022

I suggest replacing tf.map_fn on line 74 by tf.vectorized_map, as this provides a considerable speedup (or maybe make it an additional option to choose from for compatibility).

@mrpep
Copy link
Owner

mrpep commented May 8, 2022

Thanks for the suggestion! I tried replacing it but when I test it in the colab notebook, all the batch instances have the same gaps, so I think that it is not vectorizing well the random ops. I will take a deeper look when I have some free time.

image

@Joemgu7
Copy link
Author

Joemgu7 commented May 11, 2022

Thanks for the report, I hadn't noticed that the masks where the same on every output. I investigated too and think that it's more likely a concurrency issue because all instances of make_gap in a batch that is being processed are assigned to the same mask. therefore the same mask gets applied to every output (this is only an assumption). I tried fixing it but I'm running into some issues. Will get back if I make any meaningful progress.

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

2 participants