Skip to content

Some typo and error "ModuleNotFoundError: No module named 'ssl_priors'"  #1

@SungJun98

Description

@SungJun98

Hi, I got impressed with ur paper and am trying to replicate the results from your paper, but I've been stuck with some problems.

To check it's working, I followed ur guideline and did like this:

python3 prior_run_jobs.py --job=supervised_bayesian_learning --prior_type=shifted_gaussian --prior_path=resnet50_torchvision.pt --train_dataset=cifar10 --val_dataset=cifar10 --prior_scale=1e6 --number_of_samples_prior=5 --encoder=resnet50 --ignore_wandb

(I tried to use your pre-trained priors)

At first, it didn't work and i found some typo with ur files e.g. 'baysian' for 'bayesian', 'lern' for 'learn'

After fixing this typos, I got error like this:

Traceback (most recent call last):
File "prior_run_jobs.py", line 20, in
bayesian_learner.learn()
File "/home/BayesianTransferLearning-main/priorBox/Bayesian_learning/Bayesian_supervised.py", line 32, in learn
training_function(config, train_loader, test_loader)
File "/home/BayesianTransferLearning-main/priorBox/Bayesian_learning/train_supervised.py", line 69, in training_function
train_main(config, train_loader=train_loader, test_loader=test_loader, test_loaders=test_loaders)
File "/home/BayesianTransferLearning-main/priorBox/Bayesian_learning/train_supervised.py", line 27, in train_main
prior_params = load_prior(config['prior_path'], config,
File "/home/BayesianTransferLearning-main/priorBox/sghmc/utils.py", line 31, in load_prior
state = torch.load(path)
File "/home/.local/lib/python3.8/site-packages/torch/serialization.py", line 594, in load
return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
File "/home/.local/lib/python3.8/site-packages/torch/serialization.py", line 853, in _load
result = unpickler.load()
ModuleNotFoundError: No module named 'ssl_priors'

I found some docs about the problem what i faced but it also didn't work.

pytorch/pytorch#18325

pytorch/pytorch#3678

Can you give me any suggestion to solve this problem?

Thanks for ur kind answer :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions