Updated brain to take matrix inputs to build a network.