updating learning as inference