Skip to content

Using different num of views in a tuple #34

Description

@Twilight89

Hi, thanks for your wonderful job and readily code!

In my case, I want to use arbitrary views in a tuple, like from 2 to 8. And I have noticed that in your original paper, you did the experiment to test the influence of view num.

So do I have to retrain a model to suit one particular view num in a tuple? Or I just need one model like HERO_MODEL to test different num_images_in_tuple.

I try to directly change the model_num_views in options.py【of course I generate data_split file with num_images_in_tuple: 2】, but when I run, the terminal shows that Number of source views: 7 and I got shape error like below.

########################## Using FeatureVolumeManager ##########################
Number of source views: 7
Using all metadata.
Number of channels: [202, 128, 128, 1]
################################################################################

0%| | 0/37 [00:27<?, ?it/s]
0%| | 0/1 [00:27<?, ?it/s]
Traceback (most recent call last):
File "/root/simplerecon/test.py", line 473, in
main(opts)
File "/root/simplerecon/test.py", line 270, in main
outputs = model(
File "/root/.pyenv/versions/simplerecon/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/root/simplerecon/experiment_modules/depth_model.py", line 361, in forward
cost_volume, lowest_cost, _, overall_mask_bhw = self.cost_volume(
File "/root/.pyenv/versions/simplerecon/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/root/simplerecon/modules/cost_volume.py", line 360, in forward
self.build_cost_volume(
File "/root/simplerecon/modules/cost_volume.py", line 727, in build_cost_volume
feature_b1hw = self.mlp(
File "/root/.pyenv/versions/simplerecon/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/root/simplerecon/modules/networks.py", line 147, in forward
return self.net(x)
File "/root/.pyenv/versions/simplerecon/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/root/.pyenv/versions/simplerecon/lib/python3.9/site-packages/torch/nn/modules/container.py", line 141, in forward
input = module(input)
File "/root/.pyenv/versions/simplerecon/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/root/.pyenv/versions/simplerecon/lib/python3.9/site-packages/torch/nn/modules/linear.py", line 103, in forward
return F.linear(input, self.weight, self.bias)
File "/root/.pyenv/versions/simplerecon/lib/python3.9/site-packages/torch/nn/functional.py", line 1848, in linear
return torch._C._nn.linear(input, weight, bias)
RuntimeError: mat1 and mat2 shapes cannot be multiplied (393216x46 and 202x128)

So I assume that for different view num, I have to train a particular model to suit the size, is that right?

Hope to hear from you! THX:)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions