nematus
nematus copied to clipboard
Performance issues in the difinition of generate_initial_memories, nematus/transformer_inference.py
Hello, I found two performance issues in the definition of generate_initial_memories, nematus/transformer_inference.py, tf.zeros in line 133 and 135 will be calculated repeatedly during program execution, resulting in reduced efficiency. I think it should be created before the loop in generate_initial_memories.
Looking forward to your reply. Btw, I am very glad to create a PR to fix it if you are too busy.
thank you for this report. I'm happy to accept PRs that improve efficiency.