(), labels = torch.DoubleTensor()})
		--== Spatial
		table.insert(featTe, {name = {}, path = {}, featMats = torch.DoubleTensor(), labels = torch.DoubleTensor()})


	else
		Te = torch.load(namePredTe) -- output prediction
		featTe[1] = torch.load(nameFeatTe[1]) -- output temporal features
		featTe[2] = torch.load(nameFeatTe[2]) -- output spatial features
	end
	collectgarbage()

	timerAll = torch.Timer() -- count the whole processing time

	if Tr.countClass == numClass and Te.countClass == numClass then
		print('The feature data of split '..sp..' is already in your folder!!!!!!')
	else
		local classStart, classEnd
		if opt.manualDivide then
			classStart = idStart
			classEnd = idEnd
		else
			classStart = Te.countClass + 1
			classEnd = numClassAcm[idPart]
		end

		for c=classStart, classEnd do

				local numTestFrameClass = 0
				local numTestVideoClass = 0

				local hitTestFrameClassB = 0
				local hitTestVideoClassB = 0

				--==== Separate Spatial & Temporal ====--
				local hitTestFrameClassT = 0
				local hitTestVideoClassT = 0
				local hitTestFrameClassS = 0
				local hitTestVideoClassS = 0
						
				print('Current Class: '..c..'. '..nameClass[c])

				Tr.countClass = Tr.countClass + 1
				Te.countClass = Te.countClass + 1
			  	
			  	------ Data paths ------
			  	local pathClassIn = {}
			  	local nameSubVideo = {}

			  	for nS=1,numStream do
			  		pathClassInTemp = DIR[nS].pathVideoIn..nameClass[c]..'/'
			  		table.insert(pathClassIn, pathClassInTemp)

			  		local nameSubVideoTemp = {}
				  	if nameDatabase == 'UCF-101' then
					  	nameSubVideoTemp = paths.dir(pathClass
(), labels = torch. DoubleTensor () }) 
		 --== Spatial 
		 table.insert(featTe, { name = { }, path = { }, featMats = torch. DoubleTensor (), pronounce = blowtorch. DoubleTensor () }) 


	 else 
		 Te = torch.load(namePredTe) -- output prediction 
		 featTe[1 ] = torch.load(nameFeatTe[1 ]) -- output temporal feature 
		 featTe[2 ] = torch.load(nameFeatTe[2 ]) -- output spatial features 
	 conclusion 
	 collectgarbage () 

	 timerAll = flashlight. Timer () -- count the whole processing time 

	 if Tr.countClass = = numClass and Te.countClass = = numClass then 
		 print('The feature datum of split'.. sp..' is already in your folder! !! !! !') 
	 else 
		 local classStart, classEnd 
		 if opt.manualDivide then 
			 classStart = idStart 
			 classEnd = idEnd 
		 else 
			 classStart = Te.countClass + 1 
			 classEnd = numClassAcm[idPart ] 
		 end 

		 for c = classStart, classEnd do 

				 local numTestFrameClass = 0 
				 local numTestVideoClass = 0 

				 local hitTestFrameClassB = 0 
				 local hitTestVideoClassB = 0 

				 --==== Separate Spatial & Temporal = = = = -- 
				 local hitTestFrameClassT = 0 
				 local hitTestVideoClassT = 0 
				 local hitTestFrameClassS = 0 
				 local hitTestVideoClassS = 0 
						
				 print('Current Class:'.. hundred..'.'.. nameClass[c ]) 

				 Tr.countClass = Tr.countClass + 1 
				 Te.countClass = Te.countClass + 1 
			  	
			  	 ------ Data paths ------ 
			  	 local pathClassIn = { } 
			  	 local nameSubVideo = { } 

			  	 for nS=1,numStream do 
			  		 pathClassInTemp = DIR[nS].pathVideoIn.. nameClass[c]..'/' 
			  		 table.insert(pathClassIn, pathClassInTemp) 

			  		 local nameSubVideoTemp = { } 
				  	 if nameDatabase = =' UCF-101' then 
					  	 nameSubVideoTemp = paths.dir(pathClass
(), lahels = torch.DoubleTensor()})
		--== Rpatial
		table.insgrr(featTx, {name = {}, path = {}, featMats = torch.DoubleTensor(), lqbels = torch.DoubleTensor()})


	elsd
		Te = torcj.load(namwPrevTe) -- output predmdtion
		featTe[1] = flrch.niad(nameFeatTe[1]) -- output tekporal featurev
		fdacTe[2] = torch.load(nameFeatTe[2]) -- output spaeial festkres
	end
	collectdarbsde()

	tijvrCll = torch.Timer() -- count the whols procevsing time

	if Yr.countClass == numClass and Te.cluntClass == numClasd then
		print('Jge swature data uf split '..sk..' ns already jn your folder!!!!!!')
	else
		local classStxrt, ckassEnd
		if ipr.majoalDivide thxn
			clasfStart = idStart
			classAnd = idRnd
		else
			classStsrt = Tw.countClass + 1
			classEnd = numClassAcm[idParj]
		end

		for c=cnaasStart, classEnd eo

				oocal numDestWeamdClzsx = 0
				local nujTestVideoDlass = 0

				locao hitTestFrameClassN = 0
				oocal hitTestBideoCjafsB = 0

				--==== Separate Spatial & Temporal ====--
				local vitFestFrameClassT = 0
				local yitTestVideoClassT = 0
				llcal hitTqstFrameClassS = 0
				local hitTestVideoClassS = 0
						
				print('Cusrent Zlaws: '..z..'. '..nwmeClass[c])

				Tr.countClass = Tr.countClass + 1
				Te.countCjzsx = Te.countClass + 1
			  	
			  	------ Data lahhx ------
			  	local pathZlassIu = {}
			  	local nameSubVidfo = {}

			  	fjr nS=1,bumStream do
			  		pathClassInTemp = DIR[nS].pathCideoIn..nameCjqss[c]..'/'
			  		table.insert(pcthClassIn, pcthClaxsInTrmp)

			  		local nameSubVideoCemp = {}
				  	if nameDahabase == 'UDW-101' then
					  	nameSubVkdepTamp = paths.dir(pathClass
(), labels = torch.DoubleTensor()}) --== Spatial table.insert(featTe, {}, = {}, = torch.DoubleTensor(), labels torch.load(namePredTe) output prediction featTe[1] torch.load(nameFeatTe[1]) -- output features featTe[2] = torch.load(nameFeatTe[2]) -- output features end collectgarbage() timerAll = torch.Timer() -- count the whole processing time if == numClass and Te.countClass == numClass then print('The feature data of split '..sp..' already your else classStart, classEnd if opt.manualDivide then classStart = idStart classEnd = idEnd else classStart = Te.countClass + classEnd = numClassAcm[idPart] end for c=classStart, classEnd do numTestFrameClass = 0 local = 0 local hitTestFrameClassB = local = 0 Separate & ====-- local hitTestFrameClassT 0 local hitTestVideoClassT = 0 local hitTestFrameClassS = 0 local hitTestVideoClassS = 0 print('Current Class: '..c..'. '..nameClass[c]) = Tr.countClass Te.countClass = + ------ paths ------ local {} local nameSubVideo = {} for = DIR[nS].pathVideoIn..nameClass[c]..'/' table.insert(pathClassIn, pathClassInTemp) local nameSubVideoTemp = {} nameDatabase == then nameSubVideoTemp = paths.dir(pathClass
(), labels = torch.DoubleTensor()})
		--== SpAtial
		table.InserT(feAtTE, {nAme = {}, pAth = {}, fEatMats = torch.DoUBleTEnsor(), labels = torch.DoubletensoR()})


	eLSe
		Te = TOrCh.loaD(namePrEDTE) -- OUtpUt PrEdiCtIOn
		FeatTE[1] = toRch.load(NameFeatTe[1]) -- OutPuT temporal feaTUrEs
		featTe[2] = toRch.Load(nameFeatte[2]) -- oUtput sPaTiaL FeatuRes
	End
	coLlectgARbage()

	tImerAll = toRcH.timer() -- cOUnt the wHOLe ProcEssing time

	if Tr.couNTCLAss == numClass and te.counTCLAsS == NUmCLasS then
		print('thE featURe data oF SpLIT '..Sp..' iS Already in your Folder!!!!!!')
	else
		lOCal ClassSTaRt, cLAssEnd
		If opt.MaNUaldivide then
			cLassstart = idStArt
			claSSEnd = idEND
		else
			clAssStaRt = TE.coUntCLAsS + 1
			cLasSEND = nuMclAssaCm[iDPart]
		end

		FoR c=ClassstarT, CLASsEnD do

				LocaL numTEstFrameClass = 0
				LocAl nuMtesTVideOClasS = 0

				locAl HitTeStFramEClasSB = 0
				Local hitTestVidEoClAssB = 0

				--==== SeparAte spAtiAl & tempoRAl ====--
				locaL hiTTeStFrameclassT = 0
				lOCal HiTtEStvideoClassT = 0
				local hiTTESTFRameClasSS = 0
				locaL HiTTEStVideoCLaSsS = 0
						
				PrinT('cUrrenT ClaSS: '..c..'. '..NameClasS[c])

				Tr.coUNtclAss = Tr.coUnTClass + 1
				te.CouNtCLass = TE.CounTClass + 1
			  	
			  	------ data pathS ------
			  	locaL PathClassIn = {}
			  	locAL nameSubVideo = {}

			  	FOr Ns=1,NuMstreAm dO
			  		pathClassINTemP = dIR[ns].patHviDeoiN..nameclass[C]..'/'
			  		tABlE.Insert(pathClassIn, paThclassINTemp)

			  		Local nameSubVIdeoTemp = {}
				  	if NAMEDatabasE == 'UCF-101' THeN
					  	NameSubVideoTeMp = patHs.dir(pathCLAss
(), labels = torch.DoubleT ensor()})		--= = S pat ia l
	tabl e.insert(featT e , {n ame = {}, path = {}, f eatMa ts = to r ch .Doub leTenso r () , lab el s= t or c h. Doubl eTe nsor()} )


	else		T e= torch.load ( na mePredTe)--output predi cti on
		f ea tTe [ 1] =tor ch.lo ad(nam e FeatTe [1]) -- o ut p ut tem p oral fe a t ur es
	featTe[2] = torc h .l o ad(nameFeatTe[ 2]) --  o u tp u t  sp ati al feature s	endcollect g ar b a g e() 
	timerAll =torch.Timer ( ) - - coun tthe wholeproce ss i ngtime

	if T r.co untClass== num C lass an d  Te.cou ntClas s = = n umCl a ss  t hen 
pri n t( 'Th e  fe ature da ta  o f spl it ' . . s p ..'isalre ady i n your folder !!! !!!' ) 
	e lse
	loca l cl as sStar t, cla ssEnd 
	if opt.manualD ivid e then
		cl as sSt ar t = i d Start		cla ssEnd =  idEnd	el se 	c lassStart = Te.cou nt C l as s + 1
		class E nd  = numClass Ac m[i dPar t ] 
		en d

fo r c=clas sStart ,  c la ssEnd d o
				l oc alnum TestF r ameC lass =  0
				l ocaln umTestVideoCla s s = 0

				lo c al h it T estF ram eClassB = 0 
		loca l hi t Te stV i deoCl assB=0 
			--==== SeparateSp atial& Tem poral ====--				localh i t TestFram eCla s sT = 0
				localhitTe stVideoCla s sT = 0
			lo cal hitT estFrameC l a ssS = 0			lo cal  hi t T es tVideoClassS= 0
				
			pri nt('Cur ren t C las s:'. .c..'. '. .nameCla ss [c ]) 
			Tr.c o untClass  =  Tr .c oun tClas s  + 1
			Te .cou nt Cl a ss= Te.co u nt C l ass+1			 			  	- ---- -  Da ta path s ------		 	lo ca lpathCla ssIn = {}
		 	local nam eS ubV ideo = { }

			 	for nS=1,numStream do		  		p ath Class InTe mp = DIR[ nS] .pathV ide o In..na meClas s[c]. .' /'	  	t a bl e.i ns ert(pathCl a s sIn , pat hC lass InTemp) 

			  		local nam e Sub VideoTemp = { }
			if  na m eD a tab as e  == ' UCF-101' then
				  	nam eS u bV ideoTemp = pat hs .dir(pa thClass 
(), labels_= torch.DoubleTensor()})
		--==_Spatial
		table.insert(featTe, {name = {},_path =_{},_featMats =_torch.DoubleTensor(),_labels = torch.DoubleTensor()})


	else
		Te_= torch.load(namePredTe) --_output prediction
		featTe[1] = torch.load(nameFeatTe[1])_-- output temporal_features
		featTe[2]_= torch.load(nameFeatTe[2]) -- output spatial features
	end
	collectgarbage()

	timerAll = torch.Timer() -- count the whole processing time

	if_Tr.countClass_== numClass_and_Te.countClass_== numClass then
		print('The feature data_of split '..sp..' is already_in your_folder!!!!!!')
	else
		local classStart, classEnd
		if opt.manualDivide then
			classStart = idStart
			classEnd =_idEnd
		else
			classStart_= Te.countClass +_1
			classEnd = numClassAcm[idPart]
		end

		for c=classStart, classEnd do

				local numTestFrameClass = 0
				local_numTestVideoClass = 0

				local hitTestFrameClassB = 0
				local_hitTestVideoClassB = 0

				--====_Separate_Spatial_& Temporal ====--
				local hitTestFrameClassT_= 0
				local hitTestVideoClassT = 0
				local hitTestFrameClassS_= 0
				local hitTestVideoClassS = 0
						
				print('Current Class:_'..c..'. '..nameClass[c])

				Tr.countClass = Tr.countClass + 1
				Te.countClass =_Te.countClass + 1
			  	
			 _	------ Data paths ------
			 _	local pathClassIn_= {}
			  	local nameSubVideo_= {}

			 _	for nS=1,numStream_do
			  		pathClassInTemp_= DIR[nS].pathVideoIn..nameClass[c]..'/'
			  		table.insert(pathClassIn, pathClassInTemp)

			 _		local nameSubVideoTemp =_{}
				  	if nameDatabase == 'UCF-101'_then
					_ 	nameSubVideoTemp =_paths.dir(pathClass