Defending Against Backdoor Attacks by Layer-wise Feature Analysis