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

Exception generating exporting a model with prior #279

Open
blazejkotowski opened this issue Jan 8, 2024 · 1 comment
Open

Exception generating exporting a model with prior #279

blazejkotowski opened this issue Jan 8, 2024 · 1 comment

Comments

@blazejkotowski
Copy link

blazejkotowski commented Jan 8, 2024

  1. I have preprocessed the data following way:
    rave preprocess --channels 1 --input_path <input_path> --output_path <db_path>

  2. Then I trained the model with following command
    rave train --batch 2 --channels 1 --db_path <db_path> --name <run_name> --out_path <run_out> --val_every 2500 --config v2.gin

  3. Then I trained the prior
    rave train_prior --db_path <db_path> --name <prior_name> --out_path <prior_out_path> --val_every 2500 --gpu 0

  4. Finally, on the export with the following command
    rave export --name organizmo_fire --streaming true --run <run_out_path> --prior <prior_out_path> --output ts_models/

I get the following exception

Traceback (most recent call last):
  File "/miniconda/bin/rave", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/miniconda/lib/python3.11/site-packages/scripts/main_cli.py", line 38, in main
    app.run(export.main)
  File "/miniconda/lib/python3.11/site-packages/absl/app.py", line 308, in run
    _run_main(main, args)
  File "/miniconda/lib/python3.11/site-packages/absl/app.py", line 254, in _run_main
    sys.exit(main(argv))
             ^^^^^^^^^^
  File "/miniconda/lib/python3.11/site-packages/scripts/export.py", line 566, in main
    scripted_rave = script_class(
                    ^^^^^^^^^^^^^
  File "/miniconda/lib/python3.11/site-packages/scripts/export.py", line 197, in __init__
    self.register_method(
  File "/miniconda/lib/python3.11/site-packages/nn_tilde/__init__.py", line 102, in register_method
    y = getattr(self, method_name)(x)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/miniconda/lib/python3.11/site-packages/scripts/export.py", line 345, in prior
    return self.prior_module.forward(temp)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/miniconda/lib/python3.11/site-packages/scripts/export.py", line 464, in forward
    x[..., i:i + 1] = self.step_forward(temp)
                      ^^^^^^^^^^^^^^^^^^^^^^^
  File "/miniconda/lib/python3.11/site-packages/scripts/export.py", line 445, in step_forward
    self.previous_step.copy_(x.clone())
RuntimeError: output with shape [1, 128, 1] doesn't match the broadcast shape [4, 128, 1]

At the same time, I am able to export the model without prior. What is the issue?

@alfredolozano
Copy link

I have the same problem, I think @ballerburg9005 suggests to train with msprior here: #300

But I'm not sure it works, and how.

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