('Keyword argument not understood:', 'output')
时间: 2024-01-24 16:04:35 浏览: 30
这个错误通常是因为你使用了一个不支持的参数名。在 Python 中,函数和方法有一组预定义的参数,如果你尝试传递一个函数或方法不支持的参数,就会出现这个错误。
你可以检查一下你的代码,看看是否有拼写错误或者参数名错误。如果你使用的是第三方库或框架,也可以查看它们的文档或源代码,以确定哪些参数是有效的。
相关问题
'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.
('Keyword argument not understood:', 'activation')
根据你提供的错误信息,看起来是在定义模型时出现了一个错误。错误信息中指出了一个不被理解的关键字参数'activation'。
根据你提供的代码,问题可能出现在以下这行代码中:
```
model.add(TimeDistributed(Conv1D(filters=64, kernel_size=1, activation='relu', input_shape=(None, testX.shape[1], 1))))
```
这个问题可能是因为你使用了不适用于`Conv1D`的`activation`参数。在`Conv1D`中,通常不直接使用激活函数,而是在卷积层后面添加一个激活函数层。
要解决这个问题,你可以尝试修改代码如下:
```
model.add(TimeDistributed(Conv1D(filters=64, kernel_size=1, input_shape=(None, testX.shape[1], 1))))
model.add(Activation('relu'))
```
这样可以将`Conv1D`和激活函数分开使用,以避免出现参数不被理解的错误。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.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)