Comments (7)
It's a known issue that in some legacy versions of PyTorch, the following code won't be traced.
class Model(nn.Module):
def forward(self, x):
// ...
cat_10 = self.float_functional_simple_9.cat([getitem_15, backbone_stage3_5_branch_main_7], 1)
data_9 = cat_10.data
size_9 = data_9.size()
// ...
but it will work when you write like this.
class Model(nn.Module):
def forward(self, x):
// ...
cat_10 = self.float_functional_simple_9.cat([getitem_15, backbone_stage3_5_branch_main_7], 1)
size_9 = cat_10.size()
// ...
We will work on our code generator and tracer to get rid of the .data
calls.
from tinyneuralnetwork.
@liamsun2019 We pushed a fix for the issue and the given model can be converted locally. Would you please try to remove the existing model description file and try again?
from tinyneuralnetwork.
Big thanks. I will try it out ASAP.
from tinyneuralnetwork.
I'll close this one for now. If you disagree, please feel free to reopen it.
from tinyneuralnetwork.
No problem,thanks.
from tinyneuralnetwork.
The converted tflite model cannot pass benchmark test:
./linux_x86-64_benchmark_model --graph=qat_model.tflite
STARTING!
Log parameter values verbosely: [0]
Graph: [qat_model.tflite]
Loaded model qat_model.tflite
ERROR: tensorflow/lite/kernels/concatenation.cc:179 t->params.scale != output->params.scale (3 != 2018333616)
ERROR: Node number 12 (CONCATENATION) failed to prepare.
Failed to allocate tensors!
Benchmarking failed.
Similar errors happen when doing inference with the tflite model if invoking interpreter.allocate_tensors()
from tinyneuralnetwork.
@liamsun2019 This is because of something else. I've discussed with you through online messages. Next time, please open a new issue for that. Thanks.
from tinyneuralnetwork.
Related Issues (20)
- tinynn.converter module not found! HOT 2
- [CI] several tests for modifier failed
- Whether to support pytorch to keras HOT 1
- TransposeConv wrong shape? HOT 15
- change input to INT8 after converting to tflite HOT 2
- [converter] implement torch's `aten::scaled_dot_product_attention` operator HOT 2
- Request: clamp would be more efficient to go to Bounded Relu than Maximum + Minimum HOT 3
- Do not support PReLU module? HOT 5
- torch.max not working HOT 2
- OneShotChannelPruner results in the miss of some operators HOT 4
- KeyError when executing quantization HOT 5
- PyTorch 转 TFLite 使用 int8 量化 HOT 4
- Does tinynn support following int16 quantization? HOT 1
- jit.trace succeed but tinynn tracer failed HOT 1
- It became larger after converting to tflite model HOT 4
- how to do Post-training integer quantization with int16 activation HOT 4
- unnecessary float() variables cause quantization to fail. HOT 7
- aten::index nodes take multiple indices in PyTorch model but cause an error when trying to convert to TFLite HOT 1
- aten::repeat_interleave is considered an unsupported Tensor and causing an error when trying to convert to TFLite HOT 2
- convert model error HOT 5
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 tinyneuralnetwork.