tensorflow / tensorflow/graphics
Performance issue in the definition of render_splat, tensorflow_graphics/rendering/tests/splat_test.py
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.8k
- Forks
- 374
- PR merge metrics
- No merged PRs in 30d
Description
Hello, I found a performance issue in the definition of render_splat, tensorflow_graphics/rendering/tests/splat_test.py, tf.reduce_mean in line 160 and 162 will be calculated repeatedly during program execution. I think it should be created before the loop in render_splat.
The same issue exist in tf.gather.
Looking forward to your reply. Btw, I am very glad to create a PR to fix it if you are too busy.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in tensorflow_graphics/rendering/tests/splat_test.py at render_splat, especially the tf.reduce_mean calls around lines 160 and 162, then inspect tensorflow_graphics/projects/points_to_3Dobjects/utils/evaluator.py around line 601 for the tf.gather call. Confirm the repeated operations can be created outside the loop, then run the relevant splat test and verify the evaluator behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, tensorflow
- Domain
- computer-graphics, performance
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100