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. The selected events contain either one or two electrons or muons from the top-quark decays, and are then categorized 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 greater than 2.0 is excluded at 95% confidence level while the expected upper limit is in the absence of a signal.