I am a very beginner in the field of AI. I am basically a Pharma Professional without much coding experience. I use GUI based tools for the neural network.

I am trying to develop an ANN that receives as input a protein sequence and produces as output a drug molecule. Drug molecules can be represented as fixed-length binary (0-1). This length is 881 bit.

However, I do not know how to transform protein sequences of variable length into a fixed-length binary representation.

So, how should I deal with variable-length inputs for a neural network? What is the best way?

  • $\begingroup$ Hi and welcome to AI! Maybe you should explain more in detail how the protein sequences look like, and maybe you should provide examples of variable-length protein sequences. $\endgroup$ – nbro Mar 28 at 13:13
  • $\begingroup$ It seem dangerous $\endgroup$ – Sergei Mar 29 at 1:08
  • $\begingroup$ instagram.com/p/B-D7kSijHZx/?igshid=va9r8ad2tjyl $\endgroup$ – Sergei Mar 29 at 1:09

The most common way people deal with inputs of varying length is padding.

You first define the desired sequence length, i.e. the input length you want your model yo have. Then any sequences with a shorter length than this are padded either with zeros or with special characters so that they reach the desired length. If an input is larger than your desired length, usually you'd split it into multiple inputs.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.