@@ -374,7 +374,7 @@ def createTestDataForDataCollection(
374
374
import copy
375
375
self .readFromFile (collectionfile )
376
376
self .dataclass .remove = False
377
- self .dataclass .weight = False #True #False
377
+ self .dataclass .weight = False
378
378
self .readRootListFromFile (inputfile )
379
379
self .createDataFromRoot (
380
380
self .dataclass , outputDir , False ,
@@ -930,6 +930,7 @@ def get(self):
930
930
ystored = td .y
931
931
dimy = len (ystored )
932
932
wstored = td .w
933
+ wstored = [wstored [0 ].reshape (wstored [0 ].shape [0 ])]
933
934
dimw = len (wstored )
934
935
if not self .useweights :
935
936
dimw = 0
@@ -972,6 +973,7 @@ def get(self):
972
973
else :
973
974
974
975
#randomly^2 shuffle - not needed every time
976
+ #print("RANDOM SHUFFLE")
975
977
if psamples % 2 == 0 and nepoch % 2 == 1 :
976
978
for i in range (0 ,dimx ):
977
979
td .x [i ]= shuffle (td .x [i ], random_state = psamples )
@@ -981,7 +983,6 @@ def get(self):
981
983
td .w [i ]= shuffle (td .w [i ], random_state = psamples )
982
984
for i in range (0 ,dimz ):
983
985
td .z [i ]= shuffle (td .z [i ], random_state = psamples )
984
-
985
986
for i in range (0 ,dimx ):
986
987
if (xstored [i ].ndim == 1 ):
987
988
xstored [i ] = numpy .append (xstored [i ],td .x [i ])
@@ -999,7 +1000,7 @@ def get(self):
999
1000
wstored [i ] = numpy .append (wstored [i ],td .w [i ])
1000
1001
else :
1001
1002
wstored [i ] = numpy .vstack ((wstored [i ],td .w [i ]))
1002
-
1003
+
1003
1004
for i in range (0 ,dimz ):
1004
1005
if (zstored [i ].ndim == 1 ):
1005
1006
zstored [i ] = numpy .append (zstored [i ],td .z [i ])
@@ -1019,7 +1020,7 @@ def get(self):
1019
1020
hy [0 ][ii ,NBINS ] = td .y [0 ][ii ,0 ]
1020
1021
hy [0 ][ii ,NBINS + 1 ] = td .y [0 ][ii ,1 ]
1021
1022
hystored [0 ] = numpy .vstack ((hystored [0 ],hy [0 ]))
1022
-
1023
+
1023
1024
if xstored [0 ].shape [0 ] >= self .__batchsize :
1024
1025
batchcomplete = True
1025
1026
@@ -1057,7 +1058,7 @@ def get(self):
1057
1058
splitted = numpy .split (hystored [i ],[self .__batchsize ])
1058
1059
hystored [i ] = splitted [1 ]
1059
1060
hyout [i ] = splitted [0 ]
1060
-
1061
+
1061
1062
for i in range (0 ,dimx ):
1062
1063
if (xout [i ].ndim == 1 ):
1063
1064
xout [i ]= (xout [i ].reshape (xout [i ].shape [0 ],1 ))
@@ -1070,12 +1071,6 @@ def get(self):
1070
1071
if not yout [i ].shape [1 ] > 0 :
1071
1072
raise Exception ('serious problem with the output shapes!!' )
1072
1073
1073
- for i in range (0 ,dimw ):
1074
- if (wout [i ].ndim == 1 ):
1075
- wout [i ]= (wout [i ].reshape (wout [i ].shape [0 ],1 ))
1076
- if not wout [i ].shape [1 ] > 0 :
1077
- raise Exception ('serious problem with the output shapes!!' )
1078
-
1079
1074
for i in range (0 ,dimz ):
1080
1075
if (zout [i ].ndim == 1 ):
1081
1076
zout [i ]= (zout [i ].reshape (zout [i ].shape [0 ],1 ))
@@ -1087,7 +1082,6 @@ def get(self):
1087
1082
hyout [i ]= (hyout [i ].reshape (hyout [i ].shape [0 ],1 ))
1088
1083
if not hyout [i ].shape [1 ] > 0 :
1089
1084
raise Exception ('serious problem with the output shapes!!' )
1090
-
1091
1085
processedbatches += 1
1092
1086
1093
1087
@@ -1101,13 +1095,12 @@ def get(self):
1101
1095
if self .useweights and decor :
1102
1096
yield (xout ,hyout ,wout )
1103
1097
elif self .useweights :
1104
- yield (xout ,yout ,wout )
1098
+ yield (xout ,yout ,wout )
1105
1099
elif decor :
1106
1100
yield (xout ,hyout )
1107
1101
else :
1108
1102
yield (xout ,yout )
1109
1103
1110
-
1111
1104
1112
1105
1113
1106
0 commit comments