Giter VIP home page Giter VIP logo

Comments (5)

AlexanderLutsenko avatar AlexanderLutsenko commented on May 18, 2024 1

Hi! Funnily enough, that was brought in by a recent fix: #30

It's unclear how to get convolution working in as many cases as possible with minimal tinkering. Need to mull it over.

from nobuco.

AlexanderLutsenko avatar AlexanderLutsenko commented on May 18, 2024 1

is_stride_ok = all([stride[0] == x for x in stride])

Seems like this approach is the best one, pushed a fix in v0.13.3.

from nobuco.

dr-costas avatar dr-costas commented on May 18, 2024 1

😆

I just wrote the above!

Amazing! Thank you so much for this.

from nobuco.

dr-costas avatar dr-costas commented on May 18, 2024

I read the issue and I understand the problem and the different options. Maybe adding one flag at the nobuco.pytorch_to_keras method, something like

dummy_image = torch.rand(size=(1, 3, 256, 256))
pytorch_module = MyModule().eval()

keras_model = nobuco.pytorch_to_keras(
    pytorch_module,
    args=[dummy_image], kwargs=None,
    inputs_channel_order=ChannelOrder.TENSORFLOW,
    outputs_channel_order=ChannelOrder.TENSORFLOW,
    prefer_depthwise=False,
)

Or? I can understand that you (most probably) have some design considerations already in-place for nobuco, so the above might be totally out of these considerations :D

But it would be nice to have the option to choose between using the depthwise implementation of Keras/TF over a regular grouped ConvXD, that can result in the issue mentioned by #30

from nobuco.

dr-costas avatar dr-costas commented on May 18, 2024

Or even the following can be done at nobuco/node_converters/convolution.py :

is_depthwise = groups == in_filters and is_stride_ok = all([stride[0] == x for x in stride])

from nobuco.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.