AlexWang1900

Results 3 issues of AlexWang1900

#coding=utf-8 #Author:Dodo #Date:2018-11-16 #Email:[email protected] ''' 数据集:Mnist 训练集数量:60000 测试集数量:10000(实际使用:200) ------------------------------ 运行结果:(邻近k数量:25) 向量距离使用算法——欧式距离 正确率:97% 运行时长:308s 向量距离使用算法——曼哈顿距离 正确率:14% 运行时长:246s ''' import numpy as np import time from collections import Counter def loadData(fileName): '''...

I replaced a mlp of kanlayer like this: `class MLP_KAN(nn.Module): def __init__(self,config): super().__init__() self.in_dim=config.n_embd self.first_dim=config.n_embd //4 self.out_dim=config.n_embd //4 self.kan_1 = KANLayer(self.in_dim,self.first_dim,device="cuda") self.kan_2 = KANLayer(self.first_dim,self.out_dim,device="cuda") def forward(self,x): n,l,c = x.shape x...