Skip to content

[BUG] LITE Network : parametrize with list arguments #1867

@Cyril-Meyer

Description

@Cyril-Meyer

Describe the feature or idea you want to propose

PR #1851 introduce new tests for networks. This made it possible to highlight a network not functioning as expected : LITE. We can also note that the TapNet does not behave like the other networks with kernel_size and padding parameters.

For now, those networks are ignored by the tests code ref.

        # Exceptions to fix
        if (
            attrname in ["kernel_size", "padding"]
            and network.__name__ == "TapNetNetwork"
        ):
            continue
        # LITENetwork does not seem to work with list args
        if network.__name__ == "LITENetwork":
            continue

The doc already states that list can be used, e.g. :

n_filters : int or list of int32, default = 32
        The number of filters used in one lite layer, if not a list, the same
        number of filters is used in all lite layers.

List parameterization is just not yet implemented like on other networks.

Describe your proposed solution

Implement list parametrization for LITE as for other networks e.g. Inception :

        if isinstance(self.n_filters, list):
            assert len(self.n_filters) == self.depth
            self._nb_filters = self.n_filters
        else:
            self._nb_filters = [self.n_filters] * self.depth

[.....]

        for d in range(self.depth):
[.....]
            x = self._inception_module(
                x,
                n_filters=self._nb_filters[d],
[.....]

Describe alternatives you've considered, if relevant

Another possibility, is to update the doc and to don't allow the usage of lists for the arguments.
In my opinion, this is a bad idea.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    deep learningDeep learning relateddocumentationImprovements or additions to documentationnetworksNetworks package

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions