我的问题很简单: 如何使用max-pooling layer将列表或张量的维度减少到列表中的512个元素: 我正在尝试以下代码: input_ids = tokenizer.encode(questionnn.AdaptiveMaxPool1d(512)
input_ids = m(torch.tensor([[input_ids]])) # convert the list to tensor and apply max-pooling
print(img_input)
# Convolution is followed by max-pooling(2)(x)# Convolution is followed by max-poolinglayers.MaxPooling2D(2)(x)
# Third convolution extr