jinyucai95 / edesc-pytorch Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Hi,
Thanks for your code. It helps a lot but I'm confused about how to load the data from CIFAR-10 and CIFAR-100. May I have to load their x and y into .npy file? Also, is it available for other datasets?
Thanks a lot!
你好!我对EDESC聚类方法非常感兴趣,请问在Ubuntu系统中安装pytorch和TensorFlow完配置好环境后,使用指令“python EDESC.py” 发现报错“segmentation fault” 是怎么回事呢?应该怎么运行代码呢?
Thanks for your GREAT work!! And the released code really helps a lot!!
But when I tried to replicate the experimental results on CIFAR10, I failed and only got 0.35 accuracy.
It might because of the inappropriate hyper-parameter setting, or my misunderstanding on other experimental details on CIFAR10.
I've tried different beta values (0.1, 1,5, 10) and d values (5, 10). And for the feature extraction on CIFAR10, here's my implementation:
@torch.no_grad()
def CIFAR10_features():
cifar10 = torchvision.datasets.CIFAR10(root='/home/mxh/datasets/CIFAR10',train=True,download=False)
model = torchvision.models.resnet50(weights='DEFAULT')
model.eval()
model.fc= torch.nn.Identity()
to_tensor = transforms.ToTensor()
img_list = []
label_list = []
for idx in tqdm(range(len(cifar10))):
img,label = cifar10[idx]
img = to_tensor(img).unsqueeze(0)
img_list.append(model(img))
label_list.append(label)
cifar10 = torchvision.datasets.CIFAR10(root='/home/mxh/datasets/CIFAR10',train=False,download=False)
for idx in tqdm(range(len(cifar10))):
img,label = cifar10[idx]
img = to_tensor(img).unsqueeze(0)
img_list.append(model(img))
label_list.append(label)
img_list = torch.cat(img_list, dim=0).numpy()
label_list = np.array(label_list)
data = {'data':img_list, 'label':label_list}
np.save("/home/mxh/codes/EDESC/data/CIFAR10/cifar.npy", data)
Could you please give me some advice on the replication of CIFAR10? It would be extremely helpful!! Thanks a lot!!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.