Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't set attribute error #1

Open
wubinbai opened this issue Apr 22, 2020 · 8 comments
Open

can't set attribute error #1

wubinbai opened this issue Apr 22, 2020 · 8 comments

Comments

@wubinbai
Copy link

here is everything:

wb@i7:~/git/6th/audiotagging2019$ python run.py --model xresnet18ssa --base_dim 128 --SZ 256 --fold_number -1 --n_epochs 80 --loss_name FocalLoss --weights_file model1 --csv_name submission1.csv

Starting run using the following configuration:
path : data
working_path : .
base_dim : 128
SZ : 256
BS : 64
lr : 0.01
n_epochs : 80
epoch_size : 1000
f2cl : 1
fold_number : -1
loss_name : FocalLoss
csv_name : submission1.csv
model : xresnet18ssa
load_weights :
weights_file : model1
max_processors: 8
force : False

Computing mel spectrograms for the curated train dataset and saving as .png:
|| 100.00% [4970/4970 00:55<00:00]
Computing mel spectrograms for the noisy train dataset and saving as .png:
|| 100.00% [19815/19815 05:58<00:00]
Computing mel spectrograms for the test dataset:
|| 100.00% [3361/3361 01:04<00:00]

Loading train data:
Traceback (most recent call last):00]
File "run.py", line 250, in
load_weights=load_weights, force=args.force)
File "run.py", line 124, in main
.databunch(samplers=samplers, path=working_path, bs=BS)
File "/home/wb/anaconda3/lib/python3.6/site-packages/fastai/data_block.py", line 550, in databunch
num_workers=num_workers, dl_tfms=dl_tfms, device=device, collate_fn=collate_fn, no_check=no_check, **kwargs)
File "/home/wb/git/6th/audiotagging2019/utils.py", line 19, in create
zip(datasets, (bs,val_bs,val_bs,val_bs), samplers) if d is not None]
File "/home/wb/git/6th/audiotagging2019/utils.py", line 19, in
zip(datasets, (bs,val_bs,val_bs,val_bs), samplers) if d is not None]
File "/home/wb/git/6th/audiotagging2019/utils.py", line 42, in init
super().init(data_source)
File "/home/wb/git/6th/audiotagging2019/utils.py", line 36, in init
self.num_samples = num_samples
AttributeError: can't set attribute

@wubinbai
Copy link
Author

wubinbai commented May 8, 2020

fastai.version == 1.0.60

@wubinbai
Copy link
Author

wubinbai commented May 8, 2020

I downgrade fastai to 1.0.51 as described in the README ,same error occurs.

@wubinbai
Copy link
Author

@mnpinto

@mnpinto
Copy link
Owner

mnpinto commented Jun 15, 2020

@wubinbai Sorry for the late reply, I didn't get a notification before. Your problem is due to a newer version of Pytorch. I merged a newer branch that solves that problem. Let me know if there are any additional issue.

@mnpinto mnpinto closed this as completed Jun 15, 2020
@wubinbai
Copy link
Author

wubinbai commented Sep 8, 2020

@mnpinto HI there is actually one more problem with this new update of your code:

when running run.py:

/pytorch/aten/src/ATen/native/IndexingUtils.h:20: UserWarning: indexing with dtype torch.uint8 is now deprecated, please use a dtype torch.bool instead.
Warning: indexing with dtype torch.uint8 is now deprecated, please use a dtype torch.bool instead. (expandTensors at /pytorch/aten/src/ATen/native/IndexingUtils.h:20)

@mnpinto mnpinto reopened this Sep 8, 2020
@wubinbai
Copy link
Author

Hello! I am wondering if this repo is still good to implement or not since last time I have encountered that problem. Probably I will try it if this is useful. Otherwise, it looks like the repo for the newly closed competition (kaggle's rainforest) is good to follow haha. Thanks!!

@mnpinto
Copy link
Owner

mnpinto commented Feb 28, 2021

Hello! The https://github.com/mnpinto/dl_pipeline is probably a better starting point as it uses already the new fastai version and the code is more modular and easier to adapt to other problems. Keep in mind that my solution for Kaggle's rainforest is designed for single class classification, for multiclass it may need a few changes.

@Uneasy-Z
Copy link

Could you please tell me the version of the libraie, such as librosa, numpy,etc. used in this repo? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants