Upon examining the code, I noticed that it utilizes the sklearn cosine function to detect duplicates in the CNN. However, this implementation hampers performance, leading to slower execution. I recommend employing PyTorch to compute the cosine similarity instead, which should significantly improve the efficiency.
Upon examining the code, I noticed that it utilizes the sklearn cosine function to detect duplicates in the CNN. However, this implementation hampers performance, leading to slower execution. I recommend employing PyTorch to compute the cosine similarity instead, which should significantly improve the efficiency.