yuanyuanli85 / FashionAI_KeyPoint_Detection_Challenge_Keras

Code for TianChi 2018 FashionAI Cloth KeyPoint Detection Challenge
MIT License
175 stars 55 forks source link

Run Demo error #8

Open mengibin opened 5 years ago

mengibin commented 5 years ago

我运行了demo,但是报模型错误。

Traceback (most recent call last): File "/Users/mengbin/Documents/study/python/FashionAI_KeyPoint_Detection_Challenge_Keras/src/top/demo.py", line 56, in demo(args.modelfile) File "/Users/mengbin/Documents/study/python/FashionAI_KeyPoint_Detection_Challenge_Keras/src/top/demo.py", line 28, in demo xEval = Evaluation('all', modelfile) File "../eval/evaluation.py", line 26, in init self._initialize(modelFile) File "../eval/evaluation.py", line 57, in _initialize self._initialize_network(modelFile) File "../eval/evaluation.py", line 60, in _initialize_network self.net = load_model(modelFile, custom_objects={'euclidean_loss': euclidean_loss, 'Scale': Scale}) File "/Users/mengbin/Documents/study/python/tesonflow/crnn_ctc_ocr.Tensorflow/venv/lib/python3.6/site-packages/keras/models.py", line 247, in load_model custom_objects=custom_objects) File "/Users/mengbin/Documents/study/python/tesonflow/crnn_ctc_ocr.Tensorflow/venv/lib/python3.6/site-packages/keras/optimizers.py", line 653, in deserialize printable_module_name='optimizer') File "/Users/mengbin/Documents/study/python/tesonflow/crnn_ctc_ocr.Tensorflow/venv/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 141, in deserialize_keras_object return cls.from_config(config['config']) File "/Users/mengbin/Documents/study/python/tesonflow/crnn_ctc_ocr.Tensorflow/venv/lib/python3.6/site-packages/keras/optimizers.py", line 101, in from_config return cls(config) File "/Users/mengbin/Documents/study/python/tesonflow/crnn_ctc_ocr.Tensorflow/venv/lib/python3.6/site-packages/keras/optimizers.py", line 371, in init super(Adam, self).init(kwargs) File "/Users/mengbin/Documents/study/python/tesonflow/crnn_ctc_ocr.Tensorflow/venv/lib/python3.6/site-packages/keras/optimizers.py", line 38, in init 'passed to optimizer: ' + str(k)) TypeError: Unexpected keyword argument passed to optimizer: amsgrad

Process finished with exit code 1

yuanyuanli85 commented 5 years ago

looks like it is related to keras version. I will double check.

mengibin commented 5 years ago

Thanks

孟斌

中船重工第七〇二研究所 中船重工奥蓝托无锡软件技术有限公司 地址:江苏无锡市山水东路222号

Mobile-13665145171

在 2019年8月22日,下午9:21,VictorLi notifications@github.com 写道:

looks like it is related to keras version. I will double check.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/yuanyuanli85/FashionAI_KeyPoint_Detection_Challenge_Keras/issues/8?email_source=notifications&email_token=AELGISAVMKQJI2V3YETOYDDQF2HHLA5CNFSM4IOUXEOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD45CGBY#issuecomment-523903751, or mute the thread https://github.com/notifications/unsubscribe-auth/AELGISAB6OGFNH2663BOQT3QF2HHLANCNFSM4IOUXEOA.

freshn commented 4 years ago

@yuanyuanli85 @mengibin Same here. Has it been fixed?

freshn commented 4 years ago

@yuanyuanli85 @mengibin Same here. Has it been fixed?

Fixed. It is a Keras version issue. I solve this error by using Keras 2.2.2. Actually, from an answer from stackover, Keras with version 2.1.3 or later can handle this problem.

levindabhi commented 3 years ago

@freshn Can you please share your TensorFlow version in which you are able to run successfully

freshn commented 3 years ago

@levindabhi I don't maintain that code locally now. Sorry but I can't help.