You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error occurred before preparing next-gen-train-data in the first generation g0 after conducting p0-i0, p1-i0, and p2-i0.
File "cli.py", line 282, in <module>
main()
File "cli.py", line 266, in main
pet.train_ipet(pet_model_cfg, pet_train_cfg, pet_eval_cfg, ipet_cfg, sc_model_cfg, sc_train_cfg, sc_eval_cfg,
File "C:\Users\uber\Desktop\2023\pet\pet\modeling.py", line 191, in train_ipet
generate_ipet_train_sets(train_data=train_data, unlabeled_data=unlabeled_data,
File "C:\Users\uber\Desktop\2023\pet\pet\modeling.py", line 683, in generate_ipet_train_sets
subdir_train_set = generate_ipet_train_set(
File "C:\Users\uber\Desktop\2023\pet\pet\modeling.py", line 727, in generate_ipet_train_set
logits = np.average(logits, axis=0, weights=weights)
File "<__array_function__ internals>", line 5, in average
File "C:\Users\uber\.conda\envs\pet\lib\site-packages\numpy\lib\function_base.py", line 409, in average
raise ZeroDivisionError(
ZeroDivisionError: Weights sum to zero, can't be normalized
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.
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:pet/pet/modeling.py
Line 717 in 21d32de
is an empty array.
Any thoughts?
Regards,
Fan
The text was updated successfully, but these errors were encountered: