该段代码报错('Keyword argument not understood:', 'init')
时间: 2023-07-15 12:14:16 浏览: 41
这个错误通常是因为你在使用某个函数时,传递了一个不支持的关键字参数。这可能是因为你使用了错误的参数名称,或者你的函数版本不支持该参数。
解决方法通常是检查你的代码,并确保你使用了正确的参数名称和版本。
例如,如果你正在使用 TensorFlow,而你的代码中使用了一个叫做 "init" 的关键字参数,那么你应该将其更改为 "initializers" 或 "initializer",因为 TensorFlow 不支持 "init" 参数。
相关问题
TypeError: ('Keyword argument not understood:', 'init')
这个错误通常是因为使用了一个过时的参数或错误的参数名。在Keras中,参数`init`已经被废弃,应该使用`kernel_initializer`和`bias_initializer`代替。
例如,原本的代码可能是这样的:
```
model.add(Dense(64, init='uniform'))
```
应该改成:
```
model.add(Dense(64, kernel_initializer='uniform'))
```
如果还有其他的参数被废弃或更改了,可以查看Keras的文档或者更新日志来了解最新的用法。
'Keyword argument not understood:', 'stride'
This error message indicates that the code contains a keyword argument that is not recognized by the function or method being called. In this case, the argument "stride" is not understood by the function being called. This could be due to a typo, or the argument may not be supported by the function being used.
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)