L i ddlZddlmZddlmZdgZddZeddZedd Zed d Z ed d Z dZ de e de e de e fdZdeeefdeddfdZy)N)repeat)Any'consume_prefix_in_state_dict_if_presentc fd}||_|S)Nct|tjjr t |St t |SN) isinstance collectionsabcIterabletupler)xns \/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/torch/nn/modules/utils.pyparsez_ntuple..parse s1 a11 28OVAq\"")__name__)rnamers` r_ntupler s# EN Lr_single_pair_triple _quadruplec>tfdt|DS)zReverse the order of `t` and repeat each element for `n` times. This can be used to translate padding arg used by Conv and Pooling modules to the ones used by `F.pad`. c3BK|]}tD]}|ywr)range).0r_rs r z(_reverse_repeat_tuple.. s!:qq:A::s)r reversed)trs `r_reverse_repeat_tupler&s :HQK: ::rout_sizedefaultsreturncddl}t|t|jfr|St |t |krt dt |dzt ||t | dDcgc] \}}||n| c}}Scc}}w)Nrz#Input dimension should be at least r)torchr intSymIntlen ValueErrorzip)r'r(r+vds r_list_with_defaultr3#s(S%,,/0 8}H %>s8}q?P>QRSS.1(Hc(m^EU>& !V'F!+!4Jv 5 z;'J((--/0 MC 3x1}fnnS"--1GS[]+/9/C/C/G/G/L $$V, M(r)r)r itertoolsrtypingr__all__rrrrrr&r:r,r3dictstrrrrrHs 5 5 !Y 7 !Y  Q % ; c d3i DI "MS#X"M "M "Mr