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

Changing window-sizes leads to errors #9

Open
CBrakenridge opened this issue Apr 4, 2023 · 1 comment
Open

Changing window-sizes leads to errors #9

CBrakenridge opened this issue Apr 4, 2023 · 1 comment

Comments

@CBrakenridge
Copy link

Hi there,

Great program!

Changing the window-size to anything but default results in errors in the prediction phase, and not uniformly across all IDs, some managed to be processed (e.g. ID 021 below). Otherwise the program works robustly and well at the default window-size.

python pre_process_data.py --gt3x-dir inpact --pre-processed-dir preprocessed --gt3x-frequency 75 --window-size 5

We are using a hip-worn accelerometer that records at 75hz.

The following error occured with --window-size 5:

INFO:main:Starting prediction generation for the subject 021_3_2009-07-28
INFO:main:Completed prediction generation for the subject 021_3_2009-07-28
INFO:main:Starting prediction generation for the subject 040_1_2009-07-18
Traceback (most recent call last):
File "make_predictions.py", line 290, in
cnn_window_size=args.cnn_window_size, gt3x_frequency=args.gt3x_frequency, model_ckpt_path=args.model_checkpoint_path, padding=args.padding)
File "make_predictions.py", line 91, in generate_predictions
int(gt3x_frequencydownsample_window), 1) for d in data], [d[1] for d in data], [d[2] for d in data]
File "make_predictions.py", line 91, in
int(gt3x_frequency
downsample_window), 1) for d in data], [d[1] for d in data], [d[2] for d in data]
ValueError: cannot reshape array of size 174150 into shape (100,3,1)

Similar issues occur at window-size 1 and 60.

Thanks for any and all support!

Cheers,

Christian

@makemebitter
Copy link
Member

Hi Christian,

Thanks for your interest in our project, and glad to hear that it works for your dataset! Unfortunately, our pre-trained models have the --window-size configuration baked-in during training and cannot be changed if you use them for inference. If you want to change this parameter, please take a look at our guide on how to train a model from scratch. Thanks for this comment; we have updated the docs accordingly to clarify this.

Best,
Yuhao

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

2 participants