Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: unorderable types: NoneType() <= int() #853

Open
qjqjqjj opened this issue Aug 23, 2018 · 4 comments
Open

TypeError: unorderable types: NoneType() <= int() #853

qjqjqjj opened this issue Aug 23, 2018 · 4 comments

Comments

@qjqjqjj
Copy link

qjqjqjj commented Aug 23, 2018

Hi all,

While I was training my own data set, all is fine for 6 hours but this error suddenly appear.

Epoch: [90][1000/1000] Time 0.516 Loss 0.198 Xent 0.019 RegLoss 0.179 Accuracy 0.989 Lr 0.00050 Cl 0.915
Running forward pass on validation set

Validation Epoch: 90 Time 0.000 Loss nan Xent nan Accuracy nan
Saving variables
Variables saved in 0.11 seconds
Saving statistics
Traceback (most recent call last):
File "src/train_softmax.py", line 580, in
main(parse_arguments(sys.argv[1:]))
File "src/train_softmax.py", line 234, in main
prelogits, prelogits_center_loss, args.random_rotate, args.random_crop, args.random_flip, prelogits_norm, args.prelogits_hist_max, args.use_fixed_image_standardization)
File "src/train_softmax.py", line 308, in train
if lr<=0:
TypeError: unorderable types: NoneType() <= int()

Does anyone know what this error is? I used the following parameters:
python3 src/train_softmax.py
--logs_base_dir ~/logs/facenet/
--models_base_dir ~/models/facenet/
--data_dir ~/facenet/done/
--image_size 160
--model_def models.inception_resnet_v1
--optimizer ADAM --learning_rate -1
--max_nrof_epochs 150
--keep_probability 0.8
--random_crop
--random_flip
--use_fixed_image_standardization
--learning_rate_schedule_file data/learning_rate_schedule_classifier_casia.txt
--weight_decay 5e-4
--embedding_size 512
--lfw_distance_metric 1
--lfw_use_flipped_images
--lfw_subtract_mean
--validation_set_split_ratio 0.05
--validate_every_n_epochs 5
--prelogits_norm_loss_factor 5e-4

@qjqjqjj
Copy link
Author

qjqjqjj commented Aug 23, 2018

I found out the cause to this as in learning_rate_schedule_classifier_casia.txt if the epoch is grater than 90 then it will stop. But can I check why there isn't any .pb file being genterated.

@rgsousa88
Copy link

I had this same error when using learning_rate_schedule_classifier_vggface2.txt as learing_rate_schedule_file and 500 epochs. I've searched in that file and facenet.py code and I've found that when epoch number is grater than 275, a None object is returnd by the function get_learning_rate_from_file. So, I've solved this by adding some lines to verify the return from this function when it is called in train_softmax.py script.

About .pb model file, this one is generated by freeze_graph.py script. This train script generates metagraph and checkpoint files. So, when running freeze_graph script, you have to pass the directory having these two files and a the output path where .pb should be saved.

@hsm4703
Copy link

hsm4703 commented Jun 29, 2019

I found out the cause to this as in learning_rate_schedule_classifier_casia.txt if the epoch is grater than 90 then it will stop. But can I check why there isn't any .pb file being genterated.
how to make .pb file can u tell me thanks

@hsm4703
Copy link

hsm4703 commented Jul 10, 2019

回溯(最近一次調用最後一次):
文件“src / train_softmax.py”,第580行,在
main(parse_arguments(sys.argv [1:]))
文件“src / train_softmax.py”,第234行,在主要的
prelogits中, prelogits_center_loss,args.random_rotate,args.random_crop,args.random_flip,prelogits_norm,args.prelogits_hist_max,args.use_fixed_image_standardization)
文件“SRC / train_softmax.py”,線306,在列車
LR = facenet.get_learning_rate_from_file(learning_rate_schedule_file,歷元)
文件“ C:\ facenet-master \ src \ facenet.py“,第295行,在get_learning_rate_from_file中
e = int(par [0])
ValueError:對於帶有基數為10的int()的無效文字:''
e = int(par[0]) this way how can i fix
i change code and use your code but i have this problem can u fix it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants