Traceback (most recent call last):
File ".\vuldeepecker.py", line 100, in <module>
main()
File ".\vuldeepecker.py", line 96, in main
blstm.train()
File "xxx\blstm.py", line 72, in train
epochs=4, class_weight=self.class_weight)
File "C:\Anaconda\Lib\site-packages\tensorflow\python\keras\engine\training.py", line 66, in _method_wrapper
return method(self, *args, **kwargs)
File "C:\Anaconda\Lib\site-packages\tensorflow\python\keras\engine\training.py", line 815, in fit
model=self)
File "C:\Anaconda\Lib\site-packages\tensorflow\python\keras\engine\data_adapter.py", line 1124, in __init__
if class_weight:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
使用 Tensorflow 2.x 作为 keras 后端,报如下错误