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

train.py giving Function call stack: train_function error. #8

Open
jk28jan1990 opened this issue Feb 18, 2021 · 2 comments
Open

train.py giving Function call stack: train_function error. #8

jk28jan1990 opened this issue Feb 18, 2021 · 2 comments

Comments

@jk28jan1990
Copy link

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

@TianLin0509
Copy link
Owner

TianLin0509 commented Feb 26, 2021 via email

@Ganesh9100
Copy link

kindly try with train v2 as it supports tensorflow > 2

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