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
#List all the weight files available in current directory
178
-
WeightFileName=modlistdir('.','.hdf5')
179
-
iflen(WeightFileName) ==0:
180
-
print('Error: No pretrained weight file found. Please either train the model or download one from the https://github.com/asingh33/CNNGestureRecognizer')
181
-
return0
182
-
else:
183
-
print('Found these weight files - {}'.format(WeightFileName))
184
-
#Load pretrained weights
185
-
w=int(input("Which weight file to load (enter the INDEX of it, which starts from 0): "))
186
-
fname=WeightFileName[int(w)]
187
-
print("loading ", fname)
188
-
model.load_weights(fname)
189
-
190
-
layer=model.layers[11]
176
+
ifnotbTraining :
177
+
#List all the weight files available in current directory
178
+
WeightFileName=modlistdir('.','.hdf5')
179
+
iflen(WeightFileName) ==0:
180
+
print('Error: No pretrained weight file found. Please either train the model or download one from the https://github.com/asingh33/CNNGestureRecognizer')
181
+
return0
182
+
else:
183
+
print('Found these weight files - {}'.format(WeightFileName))
184
+
#Load pretrained weights
185
+
w=int(input("Which weight file to load (enter the INDEX of it, which starts from 0): "))
0 commit comments