cs231n课后作业(1)

xiaoxiao2021-02-28  46

part one

k近邻算法无循环证明

Cs231n课程中knn算法的实现

 

 

dists += np.sum(np.multiply(X, X), axis = 1, keepdims = True).reshape(num_test, 1)

dists += np.sum(np.multiply(self.X_train, self.X_train), axis = 1, keepdims = True).reshape(1, num_train)

dists += -2 * np.dot(X, self.X_train.T)

dists = np.sqrt(dists)

转载请注明原文地址: https://www.6miu.com/read-2625931.html

最新回复(0)