Skip to content

PolSAR usage not updated in data.py under polsf_unet #16

@zhiwu111

Description

@zhiwu111

I noticed that the torchcvnn library has updated the PolSARtoTensor class to the new PolSAR class.
However, in the polsf_unet project, the data.py file has not been updated accordingly.

Current code in data.py:

from torchcvnn.transforms import FFTResize, PolSARtoTensor, ToTensor, Unsqueeze

...

def get_transform_instance(transform_name, name_dataset, size):

    ...

    transform_instances.append(PolSARtoTensor())
    transform_instances.append(ToTensor())

I modified it as follows, and it runs correctly after the changes, but I'm not sure whether this fully matches the intended behavior:

from torchcvnn.transforms import FFTResize, PolSAR, ToTensor, Unsqueeze

...

def get_transform_instance(transform_name, name_dataset, size):

    ...

transform_instances.append(PolSAR(out_channel=3))  # Renamed class, but now requires an argument; I guessed 3
transform_instances.append(ToTensor(dtype='complex64'))  # Now requires a dtype; I guessed 'complex64'

Could you please confirm if this update is correct?

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