strickland

Results 9 issues of strickland

## 问题描述 我的模型从 tensorflow 1.x 而来,里面包含了 LSTM,转为MNN模型以后,推理结果的部分数据TF误差很大(超过了0.01),**原模型使用 TF 多次推理结果是正常的**。 另外一个问题是,上述模型使用MNN推理多次时结果存在跳变,并且两次推理之间结果误差也超过了(0.01)。 限于个人能力,无法排查问题到底在哪儿,希望社区能提供一些帮助。 PS: github 不允许上传超过 35mb 的文件,如果需要测试代码的话,麻烦提供一个邮箱给我。 ## Version MNN: v2.8.1 Tensorflow: 1.15.1 OS: 6.5.0-15-generic #15~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 12...

question
User

# 问题描述 使用MNN converter转换得到的fp16模型,在mem_low 模式下推理时出现`Acquire buffer size = 0`这样的错误信息。原因是代码`source/backend/cpu/compute/ConvolutionFloatFactory.cpp` 条件有错误,应该是`if (fastWay && originWeightSize == 0)` ,引用了其中的部分代码: ```c++ if (lowMemory) { if (fastWay && nullptr != weightQuantInfo.get()) { return new ConvolutionHybrid(common,...

Hi 我刚接触MNN,我有一些疑问还麻烦社区帮忙解答,如果有理解不到位的地方还麻烦各位指出。 1. 为什么 MNN 不支持 `tf.switch_case` 的算子? 我尝试将下面的示例代码用MNN来进行推理,这只是一个演示 `tf.switch_case` 的样例: ```python condition = tf.compat.v1.placeholder(dtype=tf.int32, name="input") def multiply(): return tf.compat.v1.multiply(condition, 100) def add(): return tf.compat.v1.add(condition, 10) res = tf.compat.v1.switch_case(condition, branch_fns={...

User

### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Behavior Hi there. I want to specify proxy address for websocket connection...

bug

## 问题描述 按照[文档](https://www.yuque.com/mnn/cn/dmyruu)的描述,如果使用离线量化,移除代码中参数更新部分代码。所以我的理解来看,这就等同于传入校准(calibrate)就好,等同于执行多次推理。实验下来发现量化过程没有生效。 示例代码: ```python model = load_pretrained_model() quantizer = Quantizer(model, retain_sparsity=False, mode="offline",debug_info=True,bits=8) quant_model = quantizer.convert() quant_model.to(device) valid_dataset = load_dataset("zh-plus/tiny-imagenet", split="valid", streaming=True) valid_dataset = valid_dataset.map(transform_image, batched=True) valid_dataloader = DataLoader(valid_dataset, batch_size=4)...

question
stale

模型用到了 `tf.switch_case`,使用MNN转换模型时会提示: ``` shell These Op Not Support: Tensorflow::Case ``` 虽然可以使用 `tf.case` 或者 if else 平替,但是当分支比较多的时候性能并不好,因此希望社区能够增加对这个算子的支持。或者,有实现算子的更加充实的文档吗,我也可以尝试自定义算子? 官方文档描述的比较粗略,无法上手。 ## Version TensorFlow: 1.15 示例模型代码: ```python def multiply(inputs, idx): x = tf.switch_case(idx, branch_fns={...

question

## 问题描述 参考[语雀文档](https://www.yuque.com/mnn/cn/pr9o2i)使用了离线量化,为什么转换后的模型大小没有大幅度减小呢?模型信息如下: ```shell 1.9K 5月 29 14:48 compress_params_index.bin 176K 5月 29 14:28 fashion_mnist.onnx // 原模型 172K 5月 29 15:02 mnncompress_quant_fashion_mnist.mnn // 使用生成的bin,MNNConverter转换以后的模型 176K 5月 29 14:48 mnncompress_quant_fashion_mnist.onnx // 经过mnncomperss修改后的图的onnx...

Suggestion

使用repo里的[ProgramEntrance_1.py](https://github.com/openppl-public/ppq/blob/master/ProgramEntrance_1.py)来量化一个简单的模型: ```python class GarmentClassifier(nn.Module): def __init__(self): super(GarmentClassifier, self).__init__() self.conv1 = nn.Conv2d(1, 6, 5) self.pool = nn.MaxPool2d(2, 2) self.conv2 = nn.Conv2d(6, 16, 5) self.fc1 = nn.Linear(16 * 4 * 4, 120)...

### Describe the doc issue Hi there. The [Doc](https://docs.opencv.org/4.x/d5/da3/tutorial_ios_install.html) only shows how to build a framework. Is there any way to build static library? ### Fix suggestion _No response_

category: documentation