Skip to content

Error when using illu_orient in DeStripe #28

@dpshepherd

Description

@dpshepherd

Hello,

Thanks for this great software. We are trying it on some single illumination SPIM data using the leonardo_toolset version installed pypi. Following the tutorial, we were trying to use the illumination orientation as follows:

    recon = model.train(
        is_vertical = True,
        display = False,
        display_angle_orientation=False,
        angle_offset = [0],
        x = test_plane,
        illu_orient="bottom"
    )

We get the following error (full traceback):

[Leonardo-DeStripe] Backend: PyTorch | Device: cuda
Start DeStripe...

C:\Users\q2ilab\miniconda3\envs\leonardo\lib\site-packages\torch\nn\modules\module.py:1341: UserWarning: Complex modules are a new feature under active development whose design may change, and some modules might not work as expected when using complex tensors as parameters or buffers. Please file an issue at https://github.com/pytorch/pytorch/issues/new?template=bug-report.yml if a complex module does not work as expected.
  warnings.warn(
bottom
  0%|                                                                                                                                                                                                              | 0/1000 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "c:\Users\q2ilab\Documents\github\curved_aslm\test_leonardo.py", line 39, in <module>
    main()
  File "c:\Users\q2ilab\Documents\github\curved_aslm\test_leonardo.py", line 21, in main
    recon = model.train(
  File "C:\Users\q2ilab\miniconda3\envs\leonardo\lib\site-packages\leonardo_toolset\destripe\core.py", line 784, in train
    out = self.train_on_full_arr(
  File "C:\Users\q2ilab\miniconda3\envs\leonardo\lib\site-packages\leonardo_toolset\destripe\core.py", line 542, in train_on_full_arr
    Y, target = DeStripe.train_on_one_slice(
  File "C:\Users\q2ilab\miniconda3\envs\leonardo\lib\site-packages\leonardo_toolset\destripe\core.py", line 317, in train_on_one_slice
    Y = post_process_module(
  File "C:\Users\q2ilab\miniconda3\envs\leonardo\lib\site-packages\leonardo_toolset\destripe\post_processing.py", line 564, in post_process_module
    hX = linear_propagation(
  File "C:\Users\q2ilab\miniconda3\envs\leonardo\lib\site-packages\leonardo_toolset\destripe\post_processing.py", line 440, in linear_propagation
    b_new_flip = train_post_process_module(
  File "C:\Users\q2ilab\miniconda3\envs\leonardo\lib\site-packages\leonardo_toolset\destripe\post_processing.py", line 289, in train_post_process_module
    b_new, decay, weight, b_new2 = model(
  File "C:\Users\q2ilab\miniconda3\envs\leonardo\lib\site-packages\torch\nn\modules\module.py", line 1775, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "C:\Users\q2ilab\miniconda3\envs\leonardo\lib\site-packages\torch\nn\modules\module.py", line 1786, in _call_impl
    return forward_call(*args, **kwargs)
  File "C:\Users\q2ilab\miniconda3\envs\leonardo\lib\site-packages\leonardo_toolset\destripe\post_processing.py", line 74, in forward
    b_adpt = b * fusion_mask + b_old * (1 - fusion_mask)
RuntimeError: The size of tensor a (285) must match the size of tensor b (234) at non-singleton dimension 2

Any suggestions on how to properly use the illumination orientation? If we do not use the illu_orient parameter, everything works fine.

Thanks!

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