SafeAILab / EAGLE

Official Implementation of EAGLE
https://arxiv.org/pdf/2406.16858
Apache License 2.0
622 stars 59 forks source link

About tree_buffer #53

Closed reflectionie closed 3 months ago

reflectionie commented 3 months ago

Hi, thank you for your wonderful work! I would like to ask, why are there two tree_buffers in eagle? One comes from cnets here: https://github.com/SafeAILab/EAGLE/blob/aa1b4beb1f47fdf7d8bc772abdf465425a4b8b96/testbug/model/cnets.py#L465, and the other comes from EaModel: https://github.com/SafeAILab/EAGLE/blob/aa1b4beb1f47fdf7d8bc772abdf465425a4b8b96/model/ea_model.py#L178. In my test, the tree_indices of these two tree_buffers are different. Why is this? Looking forward to your reply!

reflectionie commented 3 months ago

I think I understand, one is for the original model and the other is for the auto-reg head; I closed this issue.

CRH400AF-A commented 2 months ago

I think I understand, one is for the original model and the other is for the auto-reg head; I closed this issue.

Hello, I have the same question about two tree_buffer. May I get some help from you?

  1. What's the difference between the two tree_buffer?
  2. I can understand the tree_buffer in utils.py, but I can't understand the tree_buffer in utils_c.py. How does the tree construct?

(By the way, the code lacks necessary comments and is really difficult to understand.)