日本免费高清视频-国产福利视频导航-黄色在线播放国产-天天操天天操天天操天天操|www.shdianci.com

學無先后,達者為師

網站首頁 編程語言 正文

ValueError: (‘Unrecognized keyword arguments:‘, dict_keys([‘ragged‘]))的問題 報錯解決

作者:別出BUG求求了 更新時間: 2023-11-11 編程語言

解決ValueError: (‘Unrecognized keyword arguments:’, dict_keys([‘ragged’]))

ValueError: (‘Unrecognized keyword arguments:’, dict_keys([‘ragged’]))
這個是因為老的k.Input不支持ragged參數,

找到報錯最后一行的文件,/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/input_layer.py,修改如下:

def __init__(self,
             input_shape=None,
             batch_size=None,
             dtype=None,
             input_tensor=None,
             sparse=False,
             name=None,
             **kwargs):
  if 'batch_input_shape' in kwargs:
    batch_input_shape = kwargs.pop('batch_input_shape')
    if input_shape and batch_input_shape:
      raise ValueError('Only provide the input_shape OR '
                       'batch_input_shape argument to '
                       'InputLayer, not both at the same time.')
    batch_size = batch_input_shape[0]
    input_shape = batch_input_shape[1:]
  # NOTE 注釋這里:
  # if kwargs:
  #   raise ValueError('Unrecognized keyword arguments:', kwargs.keys())

原文鏈接:https://blog.csdn.net/weixin_39589455/article/details/133643471

  • 上一篇:沒有了
  • 下一篇:沒有了
欄目分類
最近更新