mit-han-lab / amc

[ECCV 2018] AMC: AutoML for Model Compression and Acceleration on Mobile Devices
https://arxiv.org/abs/1802.03494
MIT License
428 stars 113 forks source link

Compress ProxlessNas #18

Closed HKLee2040 closed 4 years ago

HKLee2040 commented 4 years ago

I'm trying to compress ProxlessNAS but met the following error. where the model comes from model = torch.hub.load('mit-han-lab/ProxylessNAS', "proxyless_cpu", pretrained=True)

Could you please give me comments to fix the problem?

Error message: File "amc_search.py", line 262, in train(args.train_episode, agent, env, args.output) File "amc_search.py", line 142, in train observation2, reward, done, info = env.step(action) File "/home/work/amc_vww_proxless/env/channel_pruning_env.py", line 97, in step action, d_prime, preserve_idx = self.prune_kernel(self.prunable_idx[self.cur_ind], action, preserve_idx) File "/home/work/amc_vww_proxless/env/channel_pruning_env.py", line 228, in prune_kernel masked_X = X[:, mask] IndexError: boolean index did not match indexed array along dimension 1; dimension is 80 but corresponding boolean dimension is 40

HKLee2040 commented 4 years ago

Find the problem. Close the issue.

chaos1992 commented 4 years ago

@HKLee2040, could you tell me how did you solve this problem? I met the same problem