Can anybody tell me how to use mask argument in LSTM cell

I have a X_train padded sequence of shape (1400, 17640) and separate mask array of shape (1400, 17640) of type boolean what I want to create

layer1 = Input(shape=(X_train.shape[1], 1))

layer2 = Dense(64, name='layer2', mask=[need to provide mask here])(layer1)

output = Dense(10, activation='softmax', name='output')(layer2)

can you tell me how to do that if I already have pre-computed padded sequence and mask Boolean array of same size?