A search for the Standard Model Higgs boson produced in association with a top-quark pair, , is presented. The analysis uses 36.1 fb of collision data at = 13 TeV, collected with the ATLAS detector at the Large Hadron Collider in 2015 and 2016. The search targets the decay mode. Events are selected to contain either one or two electrons or muons from the top-quark decays, and are then categorised according to the number of jets and how likely these are to contain -hadrons. Multivariate techniques are used to discriminate between signal and background events, the latter being dominated by + jets production. For a Higgs boson mass of 125 GeV, the ratio of the measured signal cross-section to the Standard Model expectation is found to be . A value of higher than 2.0 is excluded at the 95% confidence level, the expected exclusion limit in the absence of signal being 1.2.