Skip to content

cannot reshape tensor of 0 elements into shape [0, -1] #350

@vaniK778

Description

@vaniK778

A question from a complete beginner: This is the full traceback:Traceback (most recent call last):
  File "/home/starno/miniconda3/envs/RAVE/bin/rave", line 7, in
    sys.exit(main())
  File "/home/starno/miniconda3/envs/RAVE/lib/python3.9/site-packages/scripts/main_cli.py", line 30, in main
    app.run(train.main)
  File "/home/starno/miniconda3/envs/RAVE/lib/python3.9/site-packages/absl/app.py", line 316, in run
    _run_main(main, args)
  File "/home/starno/miniconda3/envs/RAVE/lib/python3.9/site-packages/absl/app.py", line 261, in _run_main
    sys.exit(main(argv))
  File "/home/starno/miniconda3/envs/RAVE/lib/python3.9/site-packages/scripts/train.py", line 159, in main
    model = rave.RAVE(n_channels=FLAGS.channels)
  File "/home/starno/miniconda3/envs/RAVE/lib/python3.9/site-packages/gin/config.py", line 1605, in gin_wrapper
    utils.augment_exception_message_and_reraise(e, err_str)
  File "/home/starno/miniconda3/envs/RAVE/lib/python3.9/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise
    raise proxy.with_traceback(exception.traceback) from None
  File "/home/starno/miniconda3/envs/RAVE/lib/python3.9/site-packages/gin/config.py", line 1582, in gin_wrapper
    return fn(*new_args, **new_kwargs)
  File "/home/starno/miniconda3/envs/RAVE/lib/python3.9/site-packages/rave/model.py", line 188, in init
    self.decoder = decoder(n_channels=n_channels)
  File "/home/starno/miniconda3/envs/RAVE/lib/python3.9/site-packages/gin/config.py", line 1605, in gin_wrapper
    utils.augment_exception_message_and_reraise(e, err_str)
  File "/home/starno/miniconda3/envs/RAVE/lib/python3.9/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise
    raise proxy.with_traceback(exception.traceback) from None
  File "/home/starno/miniconda3/envs/RAVE/lib/python3.9/site-packages/gin/config.py", line 1582, in gin_wrapper
    return fn(*new_args, **new_kwargs)
  File "/home/starno/miniconda3/envs/RAVE/lib/python3.9/site-packages/gin/config.py", line 516, in meta_call_wrapper
    return cls_meta.call(new_cls, *args, **kwargs)
  File "/home/starno/miniconda3/envs/RAVE/lib/python3.9/site-packages/rave/blocks.py", line 675, in init
    waveform_module = normalization(
  File "/home/starno/miniconda3/envs/RAVE/lib/python3.9/site-packages/gin/config.py", line 1605, in gin_wrapper
    utils.augment_exception_message_and_reraise(e, err_str)
  File "/home/starno/miniconda3/envs/RAVE/lib/python3.9/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise
    raise proxy.with_traceback(exception.traceback) from None
  File "/home/starno/miniconda3/envs/RAVE/lib/python3.9/site-packages/gin/config.py", line 1582, in gin_wrapper
    return fn(*new_args, **new_kwargs)
  File "/home/starno/miniconda3/envs/RAVE/lib/python3.9/site-packages/rave/blocks.py", line 20, in normalization
    return weight_norm(module)
  File "/home/starno/miniconda3/envs/RAVE/lib/python3.9/site-packages/torch/nn/utils/weight_norm.py", line 144, in weight_norm
    WeightNorm.apply(module, name, dim)
  File "/home/starno/miniconda3/envs/RAVE/lib/python3.9/site-packages/typing_extensions.py", line 3004, in wrapper
    return arg(*args, **kwargs)
  File "/home/starno/miniconda3/envs/RAVE/lib/python3.9/site-packages/torch/nn/utils/weight_norm.py", line 60, in apply
    name + "_g", Parameter(norm_except_dim(weight, 2, dim).data)
RuntimeError: cannot reshape tensor of 0 elements into shape [0, -1] because the unspecified dimension size -1 can be any value and is ambiguous
  In call to configurable 'normalization' (<function normalization at 0x728c6301d160>)
  In call to configurable 'GeneratorV2' (<class 'rave.blocks.GeneratorV2'>)
  In call to configurable 'RAVE' (<class 'rave.model.RAVE'>)

why and how to do ?did u guys meet this error?plz tell me how to do? ; ;

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