KNN classifier with CNN features

Hi, I have extracted the features of cifar dataset using resnet18, just wondering, if I can use the KNN classifier on these extracted features (Features are stored in an embedded file). If the related code is provided, I would really appreciate that.

Yes, you should be able to transform the stored features to numpy arrays (if they are stored as tensors, use arr = tensor.numpy()) and train a KNN classifier via e.g. sklearn.neighbors.KNeighborsClassifier.