A TextCNN (from Murphy's book) classifies a sentence with 1-D convolutions of several widths over its word embeddings, followed by max-over-time pooling.
Implement textcnn_forward(token_ids, E, filters, biases, W_fc, b_fc):
token_ids: integer ids; E: embedding matrix (V, D), so the input is .filters: a list of filter banks; bank has shape (C_w, k_w, D) ( output channels of width ). biases: a matching list of (C_w,) arrays. Assume for every bank.W_fc @ feat + b_fc.Return (logits, feat, positions), where positions lists, for every feature in the same order, the time index at which its maximum was attained (the first such index on ties).