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
I try to understand this function. Not sure my understanding is right which is when the patch_builtin_len is called in a with, module.len is changed to module.__len__ in the field managed by the with, where module belongs to MODULES in
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
detectron2/detectron2/export/torchscript_patch.py
Line 316 in 0e29b7a
I try to understand this function. Not sure my understanding is right which is when the
patch_builtin_len
is called in awith
,module.len
is changed tomodule.__len__
in the field managed by thewith
, wheremodule
belongs toMODULES
indetectron2/detectron2/export/torchscript_patch.py
Line 336 in 0e29b7a
detectron2.modeling.roi_heads.fast_rcnn
.My questions are:
detectron2.modeling.roi_heads.fast_rcnn
have__len__
? I tried to import it in Ipython and found that it didn't have__len__
.patch_builtin_len
is needed? For example, indetectron2/detectron2/export/flatten.py
Line 280 in cbbc1ce
Beta Was this translation helpful? Give feedback.
All reactions