A Cosine Similarity-based Method for Out-of-Distribution Detection