Comments (5)
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.
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.
😆
I just wrote the above!
Amazing! Thank you so much for this.
from nobuco.
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.
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)
- unnecessary python 3.9 limitation HOT 1
- Tensorflow warns that variables were used in Lambda layers but are not present in tracked objects HOT 2
- I am getting 'Unimplemented nodes' exception HOT 5
- Imprecise conversion for custom log_softmax converter HOT 4
- Keras symbolic inputs/outputs do not implement `__len__` HOT 8
- Custom Softplus Layer and Einsum Error when load_model with Keras HOT 7
- Debugging tensor shapes when using dynamic axes HOT 8
- Convolution layers: Add support for `same` padding. HOT 2
- Parameter count mismatch when converting `nn.TransformerEncoderLayer` HOT 6
- ModuleNotFoundError: No module named 'keras.src.engine' HOT 3
- raise Exception(f'Failed conversion: {self.original_node}') HOT 2
- Troubleshooting Evaluation and Compilation Issues with Keras_yolov5s.h5 Conversion
- nn.Conv2d and F.conv2d with groups == input_channels (DepthWise) generates PartitionedCall in tensorflow frozen_graph HOT 1
- Failed to conversion a convolution when padding argument is 'valid' or default HOT 2
- Convert pretrained .torch model (including weights) HOT 2
- ValueError from adding tf.Tensor and None when exporting model with dynamic shapes
- Conversion fails randomly on models with multiple inputs HOT 6
- Identity layer is considered as 'Unimplemented nodes' HOT 1
- Is the MultiheadAttention converter outdated? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nobuco.