简体   繁体   English

如何在没有源代码的情况下修改预训练的张量流模型?

[英]How to modify a pre-trained tensorflow model without the source code?

I would like to modify a pre-trained model(to be specific, the ssdlit-mobilenetv2 in the tensorflow detection zoo). 我想修改一个预训练的模型(具体来说就是张量流检测动物园中的ssdlit-mobilenetv2)。 What I want to do is to extract the ouput of one layer, do some modification to the output, then feed it back and continue to run the model. 我想做的是提取一层的输出,对输出进行一些修改,然后将其反馈并继续运行模型。 I only got the .pb file and the ckpt files, how can I do this without the source code? 我只有.pb文件和ckpt文件,没有源代码怎么办?

So what code should I use? 那么我应该使用什么代码?

I think, you have no easy way of doing this.. Just write your own tool for your concrete modification based on existing data, than saving it again as checkpoint and continue train process from that point. 我认为,您没有做到这一点的简便方法。只需要根据现有数据编写用于自己的具体修改的工具,然后再将其保存为检查点并从该点继续训练即可。

If file has the information of values, so you can change it manually, but i don't think it could be effective. 如果文件具有值的信息,那么您可以手动更改它,但是我认为它可能无效。

Also, as you know the name (mobilentv2) you can find the net architecture and the source codes 另外,您知道名称(mobilentv2)时,可以找到网络体系结构和源代码

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Tensorflow如何修改保存为检查点的预训练模型 - Tensorflow how to modify a pre-trained Model saved as checkpoints 如何将预训练的张量流模型加载并预测到Java代码中? - How to load and predict a pre-trained tensorflow model into Java code? 如何在TensorFlow中使用预训练模型 - How to use pre-trained model in TensorFlow 如何在 tensorflow 中使用预训练的 model 进行预测? - how to predict with pre-trained model in tensorflow? 如何加载预训练的 tensorflow 模型,然后通过 Torch 进行推理? - How to load a pre-trained tensorflow model and then inference by torch? 如何从预训练的 TensorFlow model 中删除层? - How to remove layer from pre-trained TensorFlow model? 如何在张量流预训练模型中将输入输入到一层? - How to feed input into one layer in a tensorflow pre-trained model? 如何在tensorflowtention_ocr上运行预训练的模型? - How to run a pre-trained model on tensorflow attention_ocr? 如何加载由 Google 命名为 inception 的预训练张量流模型? - How to load pre-trained tensorflow model named inception by Google? 如何在 MLM 任务上训练 Tensorflow 的预训练 BERT? (仅在 Tensorflow 中使用预训练的 model) - How to train Tensorflow's pre trained BERT on MLM task? ( Use pre-trained model only in Tensorflow)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM