A man accused of attempting to murder a British Transport Police officer told a court he could not remember anything about the incident.