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

Hyperparameter Setting #5

Closed
Forgetmmmm opened this issue Sep 3, 2022 · 12 comments
Closed

Hyperparameter Setting #5

Forgetmmmm opened this issue Sep 3, 2022 · 12 comments

Comments

@Forgetmmmm
Copy link

Hi,when I use the dataset hugadb I set bz=8 and sample_rate=4,but it does not reach the results of the paper, and it is much worse than the results of the paper.May I ask how you set these parameters?Looking forward to your reply. Thank you.

@BenjaminFiltjens
Copy link
Owner

Hi, we do not downsample hugadb (so sr=1). However, regardless of the batch size and downsampling factor (within reasonable settings ofcourse), you should get f1@50>90 for hugadb.

We use the raw acc and gyro signals so be sure to comment out get_features in batch_gen and model.predict. Hope that helps.

@Forgetmmmm
Copy link
Author

Thank for your reply.I don't quite understand the Relationship between sr and downsampling factor.Hugadb's sampling rate in the paper is 60HZ,why set sr=1 in the code?How do I determine which datasets need to be downsampled and which datasets do not.When I use the datasets lara should I set sr=4?Looking forward to your reply. Thank you.

@BenjaminFiltjens
Copy link
Owner

BenjaminFiltjens commented Sep 4, 2022

Table 1 specifies the used sampling rate per dataset. I believe Hugadb IMU's were sampled at 60hz, we use 60hz. Hence, no need to downsample (sr=1). I believe motion capture in lara was sampled at 200hz , we use 50hz. Hence, downsampled by a factor of 4 (sr=4).

@Forgetmmmm
Copy link
Author

May I ask what tp-vicon means?When I use the datasets pku-mmd and tug,there shows do not exist these layout.

@BenjaminFiltjens
Copy link
Owner

That is the 9 node graph for the FOG (proprietary) dataset. TUG and lara use the same graph (19 nodes, lara should change from 17 to 19 nodes in our pre-print). If you do not have the graph for pku-mmd then you are using an older version.

@Forgetmmmm
Copy link
Author

Hello,I downloaded the latest codeI ,but I don't see layout= 'tug' in graph.py.When I use the dataset tug the code will report an error.

@BenjaminFiltjens
Copy link
Owner

Same graph for lara and tug

@Forgetmmmm
Copy link
Author

I'm sorry to bother you again.When I use the dataset tug I have the following problem:
ValueError:operands could not be broadcast together with shapes(3,1830,1)(3,1830,19,1)
I used the same parameters as I used to train LARA,I'm not quite sure what the problem is.

@BenjaminFiltjens
Copy link
Owner

No problem. I will re-open the issue and have a look this weekend.

@BenjaminFiltjens
Copy link
Owner

I cannot reproduce the problem with the TUG dataset. Could you give more information?

@Forgetmmmm
Copy link
Author

I made the following changes in the code:
1)There is no 'tug' in the code. I changed "elif layout =='lara'" to "elif layout==' lara 'or layout=='tug'"at line 56 of graph.py.
2)Set sample_rate=4 in the main.py.
3)Set the tensor dimensions in batch_gen:batch_input_tensor = torch.zeros(len(batch_input), 6, max(length_of_sequences), 19, 1, dtype=torch.float).
4)Set layout='tug' in ms_gcn.py.
Then when I run main.py,An error message is displayed:
Traceback (most recent call last):
File "/media/hz/A2/cmz/code/MS-GCN-main/main.py", line 63, in
trainer.train(model_dir, batch_gen, num_epochs=num_epochs, batch_size=bz, learning_rate=lr, device=device)
File "/media/hz/A2/cmz/code/MS-GCN-main/model.py", line 33, in train
batch_input, batch_target, mask, weight = batch_gen.next_batch(batch_size)
File "/media/hz/A2/cmz/code/MS-GCN-main/batch_gen.py", line 50, in next_batch
features = get_features(features)
File "/media/hz/A2/cmz/code/MS-GCN-main/batch_gen.py", line 10, in get_features
rel_coords = get_relative_coordinates(sample, references=(0))
File "/media/hz/A2/cmz/code/MS-GCN-main/data/signals/rel_coords.py", line 21, in get_relative_coordinates
ref_loc = sample[:, :, references, :]//sample
ValueError: operands could not be broadcast together with shapes (3,1830,1) (3,1830,19,1)

@BenjaminFiltjens
Copy link
Owner

Your settings are fine. I cannot reproduce the problem in "get_relative_coordinates".

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