From 519caaa2080daf552b2b12dbbc7d32e721be5589 Mon Sep 17 00:00:00 2001 From: ishnoor singh Date: Tue, 12 Sep 2023 23:31:55 +0530 Subject: [PATCH 1/4] adding train.py changes --- .gitignore | 1 + dataset/__pycache__/cifar10.cpython-38.pyc | Bin 0 -> 6195 bytes dataset/__pycache__/cifar10.cpython-39.pyc | Bin 0 -> 6157 bytes freeze | 0 models/__pycache__/wideresnet.cpython-38.pyc | Bin 0 -> 3800 bytes models/__pycache__/wideresnet.cpython-39.pyc | Bin 0 -> 3776 bytes requirements.txt | 6 ++++++ train.py | 5 +++-- utils/__pycache__/__init__.cpython-38.pyc | Bin 0 -> 430 bytes utils/__pycache__/__init__.cpython-39.pyc | Bin 0 -> 430 bytes utils/__pycache__/eval.cpython-38.pyc | Bin 0 -> 767 bytes utils/__pycache__/eval.cpython-39.pyc | Bin 0 -> 767 bytes utils/__pycache__/logger.cpython-38.pyc | Bin 0 -> 4249 bytes utils/__pycache__/logger.cpython-39.pyc | Bin 0 -> 4240 bytes utils/__pycache__/misc.cpython-38.pyc | Bin 0 -> 2806 bytes utils/__pycache__/misc.cpython-39.pyc | Bin 0 -> 2826 bytes 16 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 dataset/__pycache__/cifar10.cpython-38.pyc create mode 100644 dataset/__pycache__/cifar10.cpython-39.pyc create mode 100644 freeze create mode 100644 models/__pycache__/wideresnet.cpython-38.pyc create mode 100644 models/__pycache__/wideresnet.cpython-39.pyc create mode 100644 requirements.txt create mode 100644 utils/__pycache__/__init__.cpython-38.pyc create mode 100644 utils/__pycache__/__init__.cpython-39.pyc create mode 100644 utils/__pycache__/eval.cpython-38.pyc create mode 100644 utils/__pycache__/eval.cpython-39.pyc create mode 100644 utils/__pycache__/logger.cpython-38.pyc create mode 100644 utils/__pycache__/logger.cpython-39.pyc create mode 100644 utils/__pycache__/misc.cpython-38.pyc create mode 100644 utils/__pycache__/misc.cpython-39.pyc diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..adbb97d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +data/ \ No newline at end of file diff --git a/dataset/__pycache__/cifar10.cpython-38.pyc b/dataset/__pycache__/cifar10.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f1b4bf8f639f208682307416408984f405b730f5 GIT binary patch literal 6195 zcmbVQTaO$^74ELS%w;bguh-u7l}?-l4eT(zxqPRtPfZmKe1Bgz!q;XE<8M^i`q`)~BFR4?;|4cdM%BbWYq7RfwakoWS8d(q zRGpU%ZgKm4gWGGY>hedp%X9CW)f~_B!uv)w&x_RppQskYLRhRbKFO!hI>8_1CB7e} zNq&+a;Ik-AVWxxp5N0|QPOn+jeW=gzdDQ21y@dK!L_2c{m z>L)_Gd7wFqISzvM1@3|7g$GeT#La6)`LX*rn^7s7%DLPQ8exs9TR(=%B9c6YEYu9B zGH!B)16kQ|!2kzSxoUb@1hK3qqP=`8s)aQgJN&3jX$eUZ-+N}y@WH}s#->@>G*uxT z4lXlg%dk}!F1l?RB9FgM>u0XZP{=cpT#1uJ$S7{CoLNeEc;@1(SNy9YX^5cR2KCIV z(d}1*w6^k8=T4dk{IAAIy&lz~p!HPL?zF;o7^guRCGi;^q=5|6GqtE5h^NnJymVx$Or#J?yjXgd{E&l0G4Et7oj^lpAKBjY?LJ^{hI(W(evn9Asr% zf=)#HleFQynYT1$xkg(bep4vWSbg$eqL3O* zvx!r4vuAU5&+0p=)pMG5>hw%*9W~a>HTIU(cl)`1K6QIW&qYth?R$2=kmgX&aWl>L z*qW(nMcpTlJ{Ba;x##pJh{D}L-R@7O1)fWbJ$KFgnZffY<#eflQl3gbM~i9n3cX@) zqBmK$A+N>CG9=A`*hR6*^W;|CN&Ny+}gRFn=a$QstH|U%L4E(`VH_y|Vva(DG%c6{RYd z2BHzBl0+d@`v(2|!Q^WHkgz&jPhW*{I)eIJtuQW6DO)5-stWOF7%h`2rJo&jYD~b| z`bgEu8_)xPutznM?QF2HAMx8#&1S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Gw>=P9WdZkyEb-q(8iWQ@`bpM3GCC3jb-?j$YY)f8Duz8g0(cFrZ_~u2vtTq6 zMESyOo_xVwk0Rdr`@UpTfDqvOd62;WAP#0m_3D(=4d*Zw3d=Pg8%|t>&$gz7k-P-@d7LvCx z9j;`KDErt#l0aYd1hS!O=M<jA*2*){-yC8d{7!4}Pks$nuK)&4&m#Dhic*qIIK~(FoTX)^f89 zFFGo9PweOVa0J4d)k@_WT>5U;nRrYeGs(%pJ=Z*XG8$XHj@ASvlN!8>q%cm7X*zzN zPfaMP+ox$tjj8i#WJ68MjBA?GFnULCOj+xJj%5%h8=H7I zBAgpr^wiVDa}Gu66re!gvI_G7mVzR00B~r zBA!kOV>&^e{O3eh0m?#p8^iaHp%xqz)&WKl2NfTZOHuBetd#gNWrRNy!SSf1E@ihq z{si;{eHx{KK6Z~kd>3U?NyI+aPO2@)O&ur#bWfkqLbP@&0&3TQB=kHco~NNp$iO#3 zTje<*L1p#nMAEpia$OMc78D!`hcaTndX7<#0@dQ+>BgamwmOm4D6&0IJt;U#plK$& z)kHw0P@KXTf_$MM%P;UguZg3Sk=Q1T9qH7NbuxD$dF8yQqnmOIuwo4FmTam(@?9w9 XrcGd&sZ7Br7^PFCd?{DT&e;D2a0VY> literal 0 HcmV?d00001 diff --git a/freeze b/freeze new file mode 100644 index 0000000..e69de29 diff --git a/models/__pycache__/wideresnet.cpython-38.pyc b/models/__pycache__/wideresnet.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8d4362eea93efe536e4e3f918659ef3edbe1c1b9 GIT binary patch literal 3800 zcmZuz&2QYs6`$eva#yRhBs=m)5+!YdY}!b%(xz#eCXUr8EnsaNOGbcg3xe9ABucyF zdPrHeKwT;W>BU7(1)4*#I;tpoFVMfD$GH}$vBzGE0`Bh(SK5^k5`3I_^WKo}bAI=y zrhJC$-vbr}4aWXOlgZ1%Nw1SWhZ#Q`o|J!rIo?%wlbu_EP@sFpE34yJ=_dnN|l`?Ko#cylL#=G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__pycache__/wideresnet.cpython-39.pyc b/models/__pycache__/wideresnet.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e5782e07ca6203aabb8319ad11e8f2f9a5eedb36 GIT binary patch literal 3776 zcmZuz&u<&Y6`tAOTvC)Q$&PF}iJG=Sm^M)B0*vrm~Y zg!z;SGcr5wsoC_Pv4jncJ#XvG8iUcF$QdX34yUwp^Kcl`1@{eK9CIkSZgIVTu)T-|>Dzw`fm zy|sJqlXI@TUfPS2{IK`@FMp=;&rcql8>*f}?J$oYMM2h0`;l_vq~8r&(U4p)$eb}D=8LYceCEmgT2g$GaWM|VG0wv4)mx0JJyCXX;|w@}}rS?lExDpIX0Psp?{ z!#q-c^zbn3{wn$GFjqAi+}TfM-a>CFY+*~76YNHNsf+>{WwF5IhNG-3>h7sZoCMfs z5@pIy5A#u5&g#FWFWiT<{1&?KTqOuv-7w37;GF$;f9>-ulG$3E?I&p}GdN&>Z6g)Y z+RwJ`2KQvzmSL|4?b=rSc#C%YPX9@sO4Nr*y0;g%;;{Qp-0OEEIu7_gP1bs_?`CU9 za4UW_iSpI{6S;t|Q!wfvXS~km@YJ~V!ZRidHI)@uCEaP}#65^|4=eOuA#)Xd6 z#k+ww`x69Wie+y=BCZb%iPiwIHZTi*hUbJQb1!LV6mdB~oDC4&9VUNS7>QBNhXuwv zt}qTP+0VUBrO?F644RkM1~c0J4+T#== zl9F~~R=$p()+ZyEsCA9RO%lr_Zjg8lLh()I(n;cY<@ZSYDrs$f6v{;C$`vTiP5B1t z`D10$%(u`fMT68X!sjTI;uUl<;38uA>~As%=O4Q7R8KRF->bQ6!EFwJUgOm)YA8mthh|X#%>8 z0zm{gatim%1t?hrO6PpLVas{g$RCrSAXn9(7al}GH+&LFW$UWpmFH4Pc1wLGzfJSM zL-Xxj!f>6f^1Gy^M3ve}`uwz~Xk{|do}%BkE_Ph0yO5q_zcu~;_^JZc6-@;DKQUCqI?tdT*+V!b@#yNX9r{UlGBSEsct)p7j zuyn%)w1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--git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..a9c4fc5 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +torch==1.4 +torchvision==0.2.2 +tensorboardX +progress +matplotlib +numpy diff --git a/train.py b/train.py index 5c7905e..ea12efc 100644 --- a/train.py +++ b/train.py @@ -200,10 +200,11 @@ def train(labeled_trainloader, unlabeled_trainloader, model, optimizer, ema_opti model.train() for batch_idx in range(args.train_iteration): try: - inputs_x, targets_x = labeled_train_iter.next() + labeled_train_iter = iter(labeled_trainloader) except: labeled_train_iter = iter(labeled_trainloader) - inputs_x, targets_x = labeled_train_iter.next() + inputs_x, targets_x = next(labeled_train_iter) + try: (inputs_u, inputs_u2), _ = unlabeled_train_iter.next() diff --git a/utils/__pycache__/__init__.cpython-38.pyc b/utils/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bbad009e50a64ecd2241d9334e2300d2db75080a GIT binary patch literal 430 zcmYk1%}T^D5XYM~{cvqTUqHOBu-g|9@#E@>pnK^h#3pUCq)ACyaebQIqmN{+g0QdP z$=Ryl4DvPCT1`dftduOoTbrbP-le(6?1r{ zg>o?yM$wkLgpf)|PDqjd{Xc)A#)L5Q%`?YlvF1+bFG#6{>FX8_jrrwYVks z``u{ULN{NCmj&(1X4b8HZGeN)RV7M6pk8_ju}Rx3X;P9_T%X20`bg#~2>S}2 zoK^*AnE!8P2$>n0Wit=#^VQ?;z>l%`Z!r|-5VineUg0sse2MOV=>IYR1`JDF;E7=o z@^Br!#vFqtlkV}^7O`;aZxI?_M{>VSixhHv=gs4n?7{MCkjFzWq@C>$%$p;JPIi!Z zH!kUnt_`;qn!zPC^UTGBFkKSja4T%-BB|?|8;AK5mCo1J1$JW{?r7h*h;|)U%;B{b z%Ee3=MO*F?LMkCSAw~N4|MHO<6T-|l&m00K`QkaOXKXHPqqH_wsJh9oG~@Zj>YCh+ zyV16VZoU%FE83UMqTBS^00*V3N|b`ig=jm;TdsQA3$60$)SM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>e#ga%_h8( zscZm)7~xa2?_EXgkIic6dxez zr)Bk;+uOx{sERPk;~jj8ScpJ-tJ{U(2r%~(Ig0pWcrqPUy7)vHi=^kt@iu9?xQA7A zJSfOqirdIeY%Ec)w^C_wsFHnE#h`CNNEH4GX|Ab0GzCP}_I9#)7D(EVbjB5*V}iIt z*;usr~OF$_<9FXRK%a)pC_vL1xK za_ZQpDmQPOs@%FYss9RE&4asf+-@;#zbC#*q-rN4Nut32JlU=OSb-KWP(-eB1CE!3 zm8IMG`lC|mR_}^MW+6*U9zgrxdhvNkj-Z5%i?R$$keSewD&1mxH;GlHog~3Z@L$ky zr=KPnFTG*)0bMzc?~r`yZ&gP1HW@h`R#KSc)6cA%b-V7bZ>?|o8z#f=Kd$SVKKlO) D4;8^f literal 0 HcmV?d00001 diff --git a/utils/__pycache__/logger.cpython-39.pyc b/utils/__pycache__/logger.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5a0bbde00f16845c85e59eebea60fa63bc3f7785 GIT binary patch literal 4240 zcmb_fNsk-H6|U-yO%8{%NY)lbZVL%u1~5666+18{vJ@o>5J-#x$vF@s|B~Et>XU&40dxzHn}7iMUNwia#J9M~s;+(c-h1DB z9W5`{7@mI~vbeRz*x#vg`f*UXi=_UHOfbPyHsoE-scfaz(C#|(vfFh{o7eTsyVCUs zOxR!XZdF_qj&NV_ZcV%;JW)Yu>E}%NqWXe~YFt0CyUVE8#1iUDrrwBGME$8HzY@!$ zAy&ldpX~0cSR3%}THJ_N4|sPyUf;P8uZi`SI89s=7Y^uD)??PZ^crVnO@+{H0EGjB`7Wb1u&!V~Whsp%NeI#`g*^~>0L)8V( ztSO&y&35>dTCJBB!GO)}&g(y5BzCvOC}~=SJxaB7smUtbeijX5SwZa;lZ5=6Ui&i@ zOVv))c9!Q-CD~xReLoj*``)96;iobm$Y?l3Yx_~M_bAf6?e|9eI5FPiEbsS|UJ|A6 z;eKg6j58hSB+uGoousOrnwz#p`)2zk?55~8jIVOja^|icI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qQrt zcs!O>5l^+At3kg%$@H`y_0p>7uL86$4jIO!>W}hj)GwHVoZrt1NdMq_m}ez~=UdyG z@7~(j-h6M|o>smC(G7_OElRff`VhQp=ZK0n5z?I0ySFCBG#FoJ%`2aR6 zJc`i8&5JdtcP{bmAAS>dalliur0{P6W3V((7ZvF`yEd@8o^hcd8yaIL1 zAqjAS<1~()ISsDD{QF?VrQ-4yZ0>sUHgs|e37SdXL9QzYIL0MI%PZQOpq@k47r%nl z7ZkhBaFe|R#0vPMgkO;)F|8z7rW+V{lH^Iv^3_V1B)m$KME(L5!28L& zNU&U7AU0bdl2Obm5mC>L+$iYYkoQq`6GG)Dx;z%y1l&Z7D8IR X0mSnoC_?syEO&!;oQ@m41aIqqRvyM> literal 0 HcmV?d00001 diff --git a/utils/__pycache__/misc.cpython-39.pyc b/utils/__pycache__/misc.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3c8c27438910589cfb8717e790c7e9908bb938c9 GIT binary patch literal 2826 zcma)8OK%*<5$>MX4tJNdB3p*-IKd!BfUIHe%7kGlj3i5zg+u|#2%z%t!p5LE)4Mz5 zJXSruG`Se&5IUCt2675=GRWNYXL86TKwk|6&@tB_hkVsb3M2y~nL$@~S6BB`SAA7A zVtKjE@ciS1$*)7kzM;v*$HU}4TKxx*lnq(RQzz#`ZhL3w*xntww)cjf?fs!|`=DqI zTYRx6ELslZtXLW@S&o~xi_Wma*_fr?U-+<_`f2bb8!o4TI*#^8D}HRUxB^%%@UCqgk2gtSakhRH^96;nPYbllP*mO!8TpmE-kx zgl9DxOC1+dl(8t&xYp@=E5!NECMf)P3$*3AdsnDX9x_@>^QL8vB zGrb;_Qb$vvL?JblAYLZ&Y%WNZbLpw7#!A+8yd%_lbUuqPi;AqslIS3xiT*ji-+lo@ zv#lOC;je_s#7-`Ip1F2aanqr%#rEU1X%%~ErsApTKG>H^jO8XNlyExg?16Jx2kjwR z{Z|mpcKNQe>o(RsshfIVc^*6BM~-GEUh1FnBlqRV({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keA>?IH|@JETilQ=f*I9{Y4jJt9CY$o!vl~x?5RT9VQ zC!_$~Pdy+)_2UAunS+o_VpfTedv554fyH<4x_U$#)`$#1;E_XAL7f#; Date: Tue, 12 Sep 2023 23:48:22 +0530 Subject: [PATCH 2/4] Update train.py --- train.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/train.py b/train.py index ea12efc..002349b 100644 --- a/train.py +++ b/train.py @@ -207,10 +207,11 @@ def train(labeled_trainloader, unlabeled_trainloader, model, optimizer, ema_opti try: - (inputs_u, inputs_u2), _ = unlabeled_train_iter.next() + (inputs_u, inputs_u2), _ = next(unlabeled_train_iter) except: unlabeled_train_iter = iter(unlabeled_trainloader) - (inputs_u, inputs_u2), _ = unlabeled_train_iter.next() + (inputs_u, inputs_u2), _ = next(unlabeled_train_iter) + # measure data loading time data_time.update(time.time() - end) From 8f822b701b0ef0d63259b62012241b4f7a5f0640 Mon Sep 17 00:00:00 2001 From: ishnoor-singh2 <48507803+ishnoor-singh2@users.noreply.github.com> Date: Tue, 12 Sep 2023 23:58:21 +0530 Subject: [PATCH 3/4] Update train.py --- train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/train.py b/train.py index 002349b..f7a825e 100644 --- a/train.py +++ b/train.py @@ -200,7 +200,7 @@ def train(labeled_trainloader, unlabeled_trainloader, model, optimizer, ema_opti model.train() for batch_idx in range(args.train_iteration): try: - labeled_train_iter = iter(labeled_trainloader) + inputs_x, targets_x = next(labeled_train_iter) except: labeled_train_iter = iter(labeled_trainloader) inputs_x, targets_x = next(labeled_train_iter) From c70094f6b4f5845f2dcec8563e2a85111d106060 Mon Sep 17 00:00:00 2001 From: ishnoor-singh2 <48507803+ishnoor-singh2@users.noreply.github.com> Date: Wed, 13 Sep 2023 00:06:35 +0530 Subject: [PATCH 4/4] Update eval.py --- utils/eval.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/eval.py b/utils/eval.py index 5051350..5b84c88 100644 --- a/utils/eval.py +++ b/utils/eval.py @@ -13,6 +13,6 @@ def accuracy(output, target, topk=(1,)): res = [] for k in topk: - correct_k = correct[:k].view(-1).float().sum(0) + correct_k = correct[:k].reshape(-1).float().sum(0) res.append(correct_k.mul_(100.0 / batch_size)) - return res \ No newline at end of file + return res