Open xruifan opened 1 year ago
I found out why. My len(logits_lists)
was 2, and my logits_percentage
was 0.25. In this line: https://github.com/timoschick/pet/blob/21d32de975a911bfa0261827c9bd23dc4f0e4aa2/pet/modeling.py#L714 my num_logits_lists
, after applying round()
, become 0. Afterwards, my logits_lists
after this line: https://github.com/timoschick/pet/blob/21d32de975a911bfa0261827c9bd23dc4f0e4aa2/pet/modeling.py#L715
became an empty list, consequently, my weights
was conducted as an empty array.
Is the round() meant to round up or round down? Or is there a constraint that sets the lowest result after round() to 1? Or is there a need to change Python 3's default rounding behavior, "round half to even"?
If I got anything wrong, please let me know. I am looking forward to your reply.
Fan
I ran the code with:
The error occurred before preparing next-gen-train-data in the first generation
g0
after conductingp0-i0
,p1-i0
, andp2-i0
.It seems that my
weights
from this line: https://github.com/timoschick/pet/blob/21d32de975a911bfa0261827c9bd23dc4f0e4aa2/pet/modeling.py#L717 is an empty array.Any thoughts?
Regards, Fan