Commit c42ffe5
committed
refactor(pt): Optimize type embedding handling in se_atten
- Replaced direct assignment of `type_embd_data` with a call to `register_buffer` for better memory management.
- Improved clarity by using a temporary variable `embd_tensor` for storing the output of the embedding network before registration.
- Maintained functionality for both one-side and two-side type embeddings, ensuring consistent behavior across modes.
These changes enhance the maintainability and performance of the descriptor model.1 parent 4f72994 commit c42ffe5
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
479 | 479 | | |
480 | 480 | | |
481 | 481 | | |
482 | | - | |
483 | | - | |
484 | | - | |
| 482 | + | |
| 483 | + | |
485 | 484 | | |
486 | 485 | | |
487 | 486 | | |
| |||
494 | 493 | | |
495 | 494 | | |
496 | 495 | | |
497 | | - | |
| 496 | + | |
498 | 497 | | |
499 | 498 | | |
| 499 | + | |
500 | 500 | | |
501 | 501 | | |
502 | 502 | | |
| |||
0 commit comments