rdevon / DIM

Deep InfoMax (DIM), or "Learning Deep Representations by Mutual Information Estimation and Maximization"
BSD 3-Clause "New" or "Revised" License
799 stars 102 forks source link

error on installing cortex-DIM #14

Closed masoudpz closed 5 years ago

masoudpz commented 5 years ago

Hi and thanks for your paper, I see this error when i run pip install .

Could not find a version that satisfies the requirement cortex==0.13a0 (from cortex-DIM==0.13) (from versions: 0.1a0, 0.11) No matching distribution found for cortex==0.13a0 (from cortex-DIM==0.13)

What's wrong?

rdevon commented 5 years ago

Did you install cortex dev branch? You need to clone and install from source.

masoudpz commented 5 years ago

thanks for your response. I cloned Dev branch and reinstall cortex. it was ok. now when I run python scripts/main.py local classifier --d.source CIFAR10 -n DIM_CIFAR10 --t.epochs 1000 after downloading cifar10 I see below Error :

cortex/built_ins/datasets/torchvision_datasets.py", line 142, in handle
    uniques = sorted(np.unique(labels).tolist())
UnboundLocalError: local variable 'labels' referenced before assignment
rdevon commented 5 years ago

What version of torchvision are you using? (e.g., do python -c "import torchvision; print(torchvision.__version__)") If it's not >= 0.2.2, do a pip install torchvision --upgrade (or install cortex again with --upgrade).

rdevon commented 5 years ago

I just added a force on the torchvision version: https://github.com/rdevon/cortex/commit/71a5a5e809f59312f6368fe5b802438b9ec2cf67 So that should fix your problem.

masoudpz commented 5 years ago

thanks again, previous error was for torchvision version, after updating disappeared. now in model setup i have below error I've installed last version of cortex-dev branch.

cortex_DIM/models/controller.py", line 154, in build
    config_dict.update(**mlp_configs)
NameError: name 'mlp_configs' is not defined
rdevon commented 5 years ago

Ah, thanks for finding that bug. Should be fixed: https://github.com/rdevon/DIM/commit/bac4765a8126746675f517c7bfa1b04b88044d51

masoudpz commented 5 years ago

thanks for your follow up. when i can clone again and test the code?

rdevon commented 5 years ago

Now should be fine

masoudpz commented 5 years ago

every thing is ok now. thanks alot for your support

masoudpz commented 5 years ago

Hi Dr, I've cloned your repo and although i've cloned cortex-dev branch I get

Could not find a version that satisfies the requirement cortex==0.13a0 (from cortex-DIM==0.13) (from versions: 0.1a0, 0.11)
No matching distribution found for cortex==0.13a0 (from cortex-DIM==0.13)

again.what is your idea?