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)
- keyerror happens for oneshot pruner HOT 1
- IdentityPruner 剪枝 HOT 1
- group conv works incorrectly HOT 4
- np.squeeze error: cannot select an axis to squeeze out which has size not equal to one HOT 1
- ERROR (tinynn.converter.base) Unsupported ops: aten::ScalarImplicit HOT 6
- RuntimeError: No such operator prim::DictConstruct HOT 1
- tflite model输出结果不一致 HOT 2
- [converter] unsupported ops HOT 3
- 模型后量化警告 HOT 4
- TFLiteConverter轉換問題 HOT 6
- 剪枝問題 HOT 3
- Unsupported operator aten::max_pool2d encountered 2 time(s) HOT 5
- Concatenation has inconsistent input parameters quantization parameters HOT 6
- Could not export Python function call 'HardSwishJitAutoFn'. HOT 2
- 多输入,单输出,tinynn 从Pytorch直接QAT量化生成int8 tflite模型有些问题 HOT 50
- 模型post量化后转tflite出现如下错误 HOT 2
- 模型是监督 + 多任务 HOT 2
- Output 0 of UnbindBackward0 is a view and is being modified inplace in GRU HOT 1
- Meet Detailed error: Tensor-likes are not close! using TFLiteConverter HOT 2
- [Converter] Need transpose optimization 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 tinyneuralnetwork.