rowanz / r2c

Recognition to Cognition Networks (code for the model in "From Recognition to Cognition: Visual Commonsense Reasoning", CVPR 2019)
https://visualcommonsense.com
MIT License
466 stars 91 forks source link

segmentation fault error #4

Closed yangshao closed 5 years ago

yangshao commented 5 years ago

I try to run the train.py, but the code fails on the line:
model = Model.from_params(vocab=train.vocab, params=params['model']) The error infomation is: 01/10/2019 21:36:36 - INFO - allennlp.common.params - model.initializer = [['.final_mlp.weight', {'type': 'xavier_uniform'}], ['.final_mlp.bias', {'type': 'zero'}], ['.weight_ih.', {'type': 'xavier_uniform'}], ['.weight_hh.', {'type': 'orthogonal'}], ['.bias_ih.', {'type': 'zero'}], ['.bias_hh.', {'type': 'lstm_hidden_bias'}]] 01/10/2019 21:36:36 - INFO - allennlp.common.from_params - instantiating class <class 'allennlp.nn.initializers.Initializer'> from params {'type': 'xavier_uniform'} and extras {} 01/10/2019 21:36:36 - INFO - allennlp.common.params - model.initializer.list.list.type = xavier_uniform 01/10/2019 21:36:36 - INFO - allennlp.common.params - Converting Params object to dict; logging of default values will not occur when dictionary parameters are used subsequently. 01/10/2019 21:36:36 - INFO - allennlp.common.params - CURRENTLY DEFINED PARAMETERS: 01/10/2019 21:36:36 - INFO - allennlp.common.from_params - instantiating class <class 'allennlp.nn.initializers.Initializer'> from params {'type': 'zero'} and extras {} 01/10/2019 21:36:36 - INFO - allennlp.common.params - model.initializer.list.list.type = zero 01/10/2019 21:36:36 - INFO - allennlp.common.params - Converting Params object to dict; logging of default values will not occur when dictionary parameters are used subsequently. 01/10/2019 21:36:36 - INFO - allennlp.common.params - CURRENTLY DEFINED PARAMETERS: 01/10/2019 21:36:36 - INFO - allennlp.common.from_params - instantiating class <class 'allennlp.nn.initializers.Initializer'> from params {'type': 'xavier_uniform'} and extras {} 01/10/2019 21:36:36 - INFO - allennlp.common.params - model.initializer.list.list.type = xavier_uniform 01/10/2019 21:36:36 - INFO - allennlp.common.params - Converting Params object to dict; logging of default values will not occur when dictionary parameters are used subsequently. 01/10/2019 21:36:36 - INFO - allennlp.common.params - CURRENTLY DEFINED PARAMETERS: 01/10/2019 21:36:36 - INFO - allennlp.common.from_params - instantiating class <class 'allennlp.nn.initializers.Initializer'> from params {'type': 'orthogonal'} and extras {} 01/10/2019 21:36:36 - INFO - allennlp.common.params - model.initializer.list.list.type = orthogonal 01/10/2019 21:36:36 - INFO - allennlp.common.params - Converting Params object to dict; logging of default values will not occur when dictionary parameters are used subsequently. 01/10/2019 21:36:36 - INFO - allennlp.common.params - CURRENTLY DEFINED PARAMETERS: 01/10/2019 21:36:36 - INFO - allennlp.common.from_params - instantiating class <class 'allennlp.nn.initializers.Initializer'> from params {'type': 'zero'} and extras {} 01/10/2019 21:36:36 - INFO - allennlp.common.params - model.initializer.list.list.type = zero 01/10/2019 21:36:36 - INFO - allennlp.common.params - Converting Params object to dict; logging of default values will not occur when dictionary parameters are used subsequently. 01/10/2019 21:36:36 - INFO - allennlp.common.params - CURRENTLY DEFINED PARAMETERS: 01/10/2019 21:36:36 - INFO - allennlp.common.from_params - instantiating class <class 'allennlp.nn.initializers.Initializer'> from params {'type': 'lstm_hidden_bias'} and extras {} 01/10/2019 21:36:36 - INFO - allennlp.common.params - model.initializer.list.list.type = lstm_hidden_bias 01/10/2019 21:36:36 - INFO - allennlp.common.params - Converting Params object to dict; logging of default values will not occur when dictionary parameters are used subsequently. 01/10/2019 21:36:36 - INFO - allennlp.common.params - CURRENTLY DEFINED PARAMETERS: 01/10/2019 21:36:37 - INFO - allennlp.nn.initializers - Initializing parameters 01/10/2019 21:36:37 - INFO - allennlp.nn.initializers - Initializing span_encoder._module._module.weight_ih_l0 using .weight_ih. intitializer 01/10/2019 21:36:37 - INFO - allennlp.nn.initializers - Initializing span_encoder._module._module.weight_hh_l0 using .weight_hh. intitializer Segmentation fault

yangshao commented 5 years ago

after reinstalling the anaconda, the problem is fixed.

Anter001 commented 5 years ago

after reinstalling the anaconda, the problem is fixed.

when I run this code, there is an error 'Segmentation fault (core dumped)'.have you solved it? thank you for your reply!

Zzmonica commented 5 years ago

after reinstalling the anaconda, the problem is fixed.

when I run this code, there is an error 'Segmentation fault (core dumped)'.have you solved it? thank you for your reply!

Hi, have you solve this problem? I run into the same one, and don't know how to do. Looking forward to your reply!

yeezhu commented 5 years ago

The "segment fault error" occurs when I step into the forward function of the ROIAlign layer. Maybe it is about the version of some python dependencies. @rowanz, could you please provide the environment.yml file of your r2c conda env?

rowanz commented 5 years ago

can you double check that you've installed torchvision from the layers branch?

pip install git+git://github.com/pytorch/vision.git@24577864e92b72f7066e1ed16e978e873e19d13d
yeezhu commented 5 years ago

I changed the linux kernel and the problem is fixed. Thank you very much!

tanjatang commented 4 years ago

Hi, I have the same problem , how did you solve it? just reinstall anaconda?

tanjatang commented 4 years ago

finally I solved the problem by reinstalling anaconda and update cuda9 to cuda10