GithubHelp home page GithubHelp logo

ecinn's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ecinn's Issues

AttributeError: 'NoneType' object has no attribute 'unsqueeze' ,

Firstly, Thanks for your great work!
I am using the counterfactual module computes counterfactual examples, When starting runing, it raises the following error:

:/data/wuyunxiao/ECINN-main$ CUDA_VISIBLE_DEVICES=2 python main.py counterfactual -c config.ini
['config.ini']

Using config: config.ini
Files already downloaded and verified
Files already downloaded and verified

# # # # # # # # # # # # # # # # # # # # # # # # # # # #

Computing counterfactuals

# # # # # # # # # # # # # # # # # # # # # # # # # # # #

Computing mean embeddings
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 389/389 [00:23<00:00, 16.64it/s]
None
Traceback (most recent call last):
File "main.py", line 78, in
main()
File "main.py", line 74, in main
args.module.fn(args, cfg, model, data)
File "/data/wuyunxiao/ECINN-main/counterfactual/init.py", line 14, in fn
compute_counterfactuals(args, cfg, model, data)
File "/home/wuyunxiao/test/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/data/wuyunxiao/ECINN-main/counterfactual/compute_and_store.py", line 50, in compute_counterfactuals
means = mean_embeddings(cfg, data, model)[1:] # Skip total mean
File "/home/wuyunxiao/test/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/data/wuyunxiao/ECINN-main/counterfactual/counterfactuals.py", line 53, in mean_embeddings
means = torch.cat([m.mean.unsqueeze(0) for m in [overall_mean] + means], 0)
File "/data/wuyunxiao/ECINN-main/counterfactual/counterfactuals.py", line 53, in
means = torch.cat([m.mean.unsqueeze(0) for m in [overall_mean] + means], 0)
AttributeError: 'NoneType' object has no attribute 'unsqueeze'

Could you give me some advice on how to get rid of it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.