有什么方法可以访问tensorflow_hub.KerasLayer对象中的图层吗? [英] Is there any way to access layers in tensorflow_hub.KerasLayer object?

查看:148
本文介绍了有什么方法可以访问tensorflow_hub.KerasLayer对象中的图层吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用从Tensorflow Hub到我的对象检测模型的预训练模型.按照官方的说明,我将集线器中的模型包装为KerasLayer对象.然后,我意识到我无法访问此预训练模型中的图层.但是我需要使用某些特定层的输出来构建模型.有什么方法可以访问tensorflow_hub.KerasLayer对象中的图层?

I am trying to use a pre-trained model from tensorflow hub into my object detection model. I wrapped a model from hub as a KerasLayer object following the official instruction. Then I realized that I cannot access the layers in this pre-trained model. But I need to use outputs from some specific layers to build my model. Is there any way to access layers in tensorflow_hub.KerasLayer object?

推荐答案

要想轻松地做到这一点,预训练模型的创建者需要准备好访问该输出.例如.具有额外的功能或额外的签名,可以输出您要使用的激活.

For one to be able to do that easily, the creator of the pretrained model would have needed to make that output ready to be accessed. E.g. by having an extra function or an extra signature that outputs the activation you want to use.

这篇关于有什么方法可以访问tensorflow_hub.KerasLayer对象中的图层吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆