Open pasa13142 opened 4 years ago
Have you solved this problem? Could you share the solution,thank you very much!
Replace get_learning_rate_from_file function in facenet.py file with this function and this error will not appear.
def get_learning_rate_from_file(filename, epoch):
with open(filename, 'r') as f:
for line in f.readlines():
line = line.split('#', 1)[0]
if line:
par = line.strip().split(':')
e = int(par[0])
if par[1]=='-':
lr = -1
else:
lr = float(par[1])
if e <= epoch:
learning_rate = lr
else:
pass
return learning_rate
File "src/train_softmax.py", line 308, in train │
if lr<=0: │
TypeError: '<=' not supported between instances of 'NoneType' and 'int'
I got this error at after 275. epoch, because learning rate at learning_rate_schedule_classifier_vggface2.txt :
Learning rate schedule
Maps an epoch number to a learning rate
0: 0.05
100: 0.005
200: 0.0005
276: -1
How should I do ? Thanks for help