Open jk28jan1990 opened 3 years ago
hello, please first check that if your tensor flowers version is 1.12.0发自我的华为手机-------- 原始邮件 --------发件人: jk28jan1990 notifications@github.com日期: 2021年2月19日周五 凌晨1:36收件人: TianLin0509/BF-design-with-DL BF-design-with-DL@noreply.github.com抄送: Subscribed subscribed@noreply.github.com主 题: [TianLin0509/BF-design-with-DL] train.py giving Function call stack: train_function error. (#8) Dear Professor, I am trying to run train.py but receiving this error. please provide guidance so that I can reproduce the results. Epoch 1/50000 Traceback (most recent call last): File "c:/Users/2585552k/Downloads/BF-design-with-DL-master/train.py", line 59, in epochs=50000, verbose=2, validation_split=0.1, callbacks=[reduce_lr, checkpoint]) File "C:\Users\2585552k\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\keras\engine\training.py", line 66, in _method_wrapper return method(self, *args, kwargs) File "C:\Users\2585552k\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\keras\engine\training.py", line 848, in fit tmp_logs = train_function(iterator) File "C:\Users\2585552k\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\eager\def_function.py", line 580, in call result = self._call(*args, *kwds) File "C:\Users\2585552k\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\eager\def_function.py", line 644, in _call return self._stateless_fn(args, kwds) File "C:\Users\2585552k\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\eager\function.py", line 2420, in call return graph_function._filtered_call(args, kwargs) # pylint: disable=protected-access File "C:\Users\2585552k\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\eager\function.py", line 1665, in _filtered_call self.captured_inputs) File "C:\Users\2585552k\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\eager\function.py", line 1746, in _call_flat ctx, args, cancellation_manager=cancellation_manager)) File "C:\Users\2585552k\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\eager\function.py", line 598, in call ctx=ctx) File "C:\Users\2585552k\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\eager\execute.py", line 60, in quick_execute inputs, attrs, num_outputs) tensorflow.python.framework.errors_impl.InvalidArgumentError: Incompatible shapes: [9] vs. [64] [[node gradient_tape/model/lambda_1/MatMul/BroadcastGradientArgs (defined at c:/Users/2585552k/Downloads/BF-design-with-DL-master/train.py:59) ]] [Op:__inference_train_function_1689] Function call stack: train_function
—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe.
kindly try with train v2 as it supports tensorflow > 2
Dear Professor,
I am trying to run train.py but receiving this error. please provide guidance so that I can reproduce the results. Epoch 1/50000 Traceback (most recent call last): File "c:/Users/2585552k/Downloads/BF-design-with-DL-master/train.py", line 59, in
epochs=50000, verbose=2, validation_split=0.1, callbacks=[reduce_lr, checkpoint])
File "C:\Users\2585552k\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\keras\engine\training.py", line 66, in _method_wrapper
return method(self, *args, kwargs)
File "C:\Users\2585552k\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\keras\engine\training.py", line 848, in fit
tmp_logs = train_function(iterator)
File "C:\Users\2585552k\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\eager\def_function.py", line 580, in call
result = self._call(*args, *kwds)
File "C:\Users\2585552k\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\eager\def_function.py", line 644, in _call
return self._stateless_fn(args, kwds)
File "C:\Users\2585552k\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\eager\function.py", line 2420, in call
return graph_function._filtered_call(args, kwargs) # pylint: disable=protected-access
File "C:\Users\2585552k\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\eager\function.py", line 1665, in _filtered_call
self.captured_inputs)
File "C:\Users\2585552k\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\eager\function.py", line 1746, in _call_flat
ctx, args, cancellation_manager=cancellation_manager))
File "C:\Users\2585552k\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\eager\function.py", line 598, in call
ctx=ctx)
File "C:\Users\2585552k\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\eager\execute.py", line 60, in quick_execute
inputs, attrs, num_outputs)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Incompatible shapes: [9] vs. [64]
[[node gradient_tape/model/lambda_1/MatMul/BroadcastGradientArgs (defined at c:/Users/2585552k/Downloads/BF-design-with-DL-master/train.py:59) ]] [Op:__inference_train_function_1689]
Function call stack: train_function