我正在Keras中建立模型:
model = Sequential()
model.add(TimeDistributed(Embedding(input_dim = unique_chars, output_dim = 512, name = "embd_1"), input_shape=(None, 4, 1)))
model.add(TimeDistributed(Conv1D(filters=64, kernel_size=3, activation='relu')))
当我调用fit方法时,我得到:
Attr 'data_format' of 'Conv2D' Op passed string 'NWC' not in: "NHWC", "NCHW".
为什么会这样?我需要在嵌入和Conv1D之间插入一层吗?
提前谢谢