Complex biological systems in nature comprise of cells that act collectively to solve sophisticated tasks. Synthetic biological systems, in contrast, are designed for specific tasks, largely following computational principles including logic gates, analog design, and control theory. Yet such approaches cannot be easily adapted for multiple tasks in biological contexts. Alternatively, artificial neural networks (ANN), comprised of flexible interactions for processing and decision-making, are widely adopted for numerous applications and support adaptive designs. Motivated by the structural similarity between ANNs and cellular networks, here we implemented ANN-like computing in bacteria consortia for recognizing patterns. In cellular ANNs, receiver bacteria collectively interact through quorum sensing (QS) with sender bacteria for decision-making processes. Input patterns formed by chemical inducers, activate sender circuits to produce QS signaling molecules with varying levels. These levels are programmed by tuning the promoter strength acting as weights. We also developed an algorithm based on gradient descent, which is well-accepted in artificial intelligence, to optimize weights and experimentally examined them using 3x3-bit patterns.