def hybrid_forward(self, F, data, valid_length):  
<EOL>masked_encoded = F.SequenceMask(data,<EOL>sequence_length=valid_length,<EOL>use_sequence_length=True)<EOL>agg_state = F.broadcast_div(F.sum(masked_encoded, axis=<NUM_LIT:0>),<EOL>F.expand_dims(valid_length, axis=<NUM_LIT:1>))<EOL>return agg_state<EOL>
Forward logic