- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我一直在尝试将 InceptionResnetV2 中的 Keras implementation 模型摘要与他们论文中指定的模型摘要进行比较,当涉及到 filter_concat block 时,它似乎没有太多相似之处。
模型 summary()
的第一行如下图所示。 (对于我的情况,输入改为 512x512,但据我所知,它不会影响每层的过滤器数量,因此我们也可以使用它们来跟进纸质代码翻译):
Model: "inception_resnet_v2"
__________________________________________________________________________________________________
Layer (type) Output Shape Param # Connected to
==================================================================================================
input_1 (InputLayer) (None, 512, 512, 3) 0
__________________________________________________________________________________________________
conv2d_1 (Conv2D) (None, 255, 255, 32) 864 input_1[0][0]
__________________________________________________________________________________________________
batch_normalization_1 (BatchNor (None, 255, 255, 32) 96 conv2d_1[0][0]
__________________________________________________________________________________________________
activation_1 (Activation) (None, 255, 255, 32) 0 batch_normalization_1[0][0]
__________________________________________________________________________________________________
conv2d_2 (Conv2D) (None, 253, 253, 32) 9216 activation_1[0][0]
__________________________________________________________________________________________________
batch_normalization_2 (BatchNor (None, 253, 253, 32) 96 conv2d_2[0][0]
__________________________________________________________________________________________________
activation_2 (Activation) (None, 253, 253, 32) 0 batch_normalization_2[0][0]
__________________________________________________________________________________________________
conv2d_3 (Conv2D) (None, 253, 253, 64) 18432 activation_2[0][0]
__________________________________________________________________________________________________
batch_normalization_3 (BatchNor (None, 253, 253, 64) 192 conv2d_3[0][0]
__________________________________________________________________________________________________
activation_3 (Activation) (None, 253, 253, 64) 0 batch_normalization_3[0][0]
__________________________________________________________________________________________________
max_pooling2d_1 (MaxPooling2D) (None, 126, 126, 64) 0 activation_3[0][0]
__________________________________________________________________________________________________
conv2d_4 (Conv2D) (None, 126, 126, 80) 5120 max_pooling2d_1[0][0]
__________________________________________________________________________________________________
batch_normalization_4 (BatchNor (None, 126, 126, 80) 240 conv2d_4[0][0]
__________________________________________________________________________________________________
activation_4 (Activation) (None, 126, 126, 80) 0 batch_normalization_4[0][0]
__________________________________________________________________________________________________
conv2d_5 (Conv2D) (None, 124, 124, 192 138240 activation_4[0][0]
__________________________________________________________________________________________________
batch_normalization_5 (BatchNor (None, 124, 124, 192 576 conv2d_5[0][0]
__________________________________________________________________________________________________
activation_5 (Activation) (None, 124, 124, 192 0 batch_normalization_5[0][0]
__________________________________________________________________________________________________
max_pooling2d_2 (MaxPooling2D) (None, 61, 61, 192) 0 activation_5[0][0]
__________________________________________________________________________________________________
conv2d_9 (Conv2D) (None, 61, 61, 64) 12288 max_pooling2d_2[0][0]
__________________________________________________________________________________________________
batch_normalization_9 (BatchNor (None, 61, 61, 64) 192 conv2d_9[0][0]
__________________________________________________________________________________________________
activation_9 (Activation) (None, 61, 61, 64) 0 batch_normalization_9[0][0]
__________________________________________________________________________________________________
conv2d_7 (Conv2D) (None, 61, 61, 48) 9216 max_pooling2d_2[0][0]
__________________________________________________________________________________________________
conv2d_10 (Conv2D) (None, 61, 61, 96) 55296 activation_9[0][0]
__________________________________________________________________________________________________
batch_normalization_7 (BatchNor (None, 61, 61, 48) 144 conv2d_7[0][0]
__________________________________________________________________________________________________
batch_normalization_10 (BatchNo (None, 61, 61, 96) 288 conv2d_10[0][0]
__________________________________________________________________________________________________
activation_7 (Activation) (None, 61, 61, 48) 0 batch_normalization_7[0][0]
__________________________________________________________________________________________________
activation_10 (Activation) (None, 61, 61, 96) 0 batch_normalization_10[0][0]
__________________________________________________________________________________________________
average_pooling2d_1 (AveragePoo (None, 61, 61, 192) 0 max_pooling2d_2[0][0]
__________________________________________________________________________________________________
.
.
.
many more lines
在
their paper 的图 3(下图)中,显示了 InceptionV4 和 InceptionResnetV2 的 STEM block 是如何形成的。在图 3 中,STEM block 中有三个过滤器串联,但在我上面向您展示的输出中,串联似乎是顺序 maxpooling 或类似的混合(第一个串联应该出现在
max_pooling2d_1
之后) .它增加了连接应该做的过滤器的数量,但没有进行连接。过滤器似乎是按顺序放置的!任何人都知道此输出中发生了什么?它的作用与论文中描述的相同吗?
concatenate_1
中为 STEM block 中的第一个串联做了一个 filter_concat。这是
summary()
第一行的输出。
Model: "inception_v4"
__________________________________________________________________________________________________
Layer (type) Output Shape Param # Connected to
==================================================================================================
input_1 (InputLayer) (None, 512, 512, 3) 0
__________________________________________________________________________________________________
conv2d_1 (Conv2D) (None, 255, 255, 32) 864 input_1[0][0]
__________________________________________________________________________________________________
batch_normalization_1 (BatchNor (None, 255, 255, 32) 96 conv2d_1[0][0]
__________________________________________________________________________________________________
activation_1 (Activation) (None, 255, 255, 32) 0 batch_normalization_1[0][0]
__________________________________________________________________________________________________
conv2d_2 (Conv2D) (None, 253, 253, 32) 9216 activation_1[0][0]
__________________________________________________________________________________________________
batch_normalization_2 (BatchNor (None, 253, 253, 32) 96 conv2d_2[0][0]
__________________________________________________________________________________________________
activation_2 (Activation) (None, 253, 253, 32) 0 batch_normalization_2[0][0]
__________________________________________________________________________________________________
conv2d_3 (Conv2D) (None, 253, 253, 64) 18432 activation_2[0][0]
__________________________________________________________________________________________________
batch_normalization_3 (BatchNor (None, 253, 253, 64) 192 conv2d_3[0][0]
__________________________________________________________________________________________________
activation_3 (Activation) (None, 253, 253, 64) 0 batch_normalization_3[0][0]
__________________________________________________________________________________________________
conv2d_4 (Conv2D) (None, 126, 126, 96) 55296 activation_3[0][0]
__________________________________________________________________________________________________
batch_normalization_4 (BatchNor (None, 126, 126, 96) 288 conv2d_4[0][0]
__________________________________________________________________________________________________
max_pooling2d_1 (MaxPooling2D) (None, 126, 126, 64) 0 activation_3[0][0]
__________________________________________________________________________________________________
activation_4 (Activation) (None, 126, 126, 96) 0 batch_normalization_4[0][0]
__________________________________________________________________________________________________
concatenate_1 (Concatenate) (None, 126, 126, 160 0 max_pooling2d_1[0][0]
activation_4[0][0]
__________________________________________________________________________________________________
conv2d_7 (Conv2D) (None, 126, 126, 64) 10240 concatenate_1[0][0]
__________________________________________________________________________________________________
batch_normalization_7 (BatchNor (None, 126, 126, 64) 192 conv2d_7[0][0]
__________________________________________________________________________________________________
activation_7 (Activation) (None, 126, 126, 64) 0 batch_normalization_7[0][0]
__________________________________________________________________________________________________
conv2d_8 (Conv2D) (None, 126, 126, 64) 28672 activation_7[0][0]
__________________________________________________________________________________________________
.
.
.
and many more lines
因此,如本文所示,两种架构的第一层应该相同。或者我错过了什么?
最佳答案
它达到了相似的结果 .
我刚刚收到一封来自 Google 高级研究科学家和 blog post regarding the release of the code for InceptionResnetV2 的原始出版商 Alex Alemi 的确认错误的电子邮件。 .似乎在内部实验期间,STEM 模块被切换了,释放就保持这样。
引用:
Dani Azemar,
It seems you're right. Not entirely sure what happened but the codeis obviously the source of truth in the sense that the releasedcheckpoint is for the code that is also released. When we weredeveloping the architecture we did a whole slew of internalexperiments and I imagine at some point the stems were switched. Notsure I have the time to dig deeper at the moment, but like I said, thereleased checkpoint is a checkpoint for the released code as you canverify yourself by running the evaluation pipeline. I agree with youthat it seems like this is using the original Inception V1 stem.Best Regards,
Alex Alemi
The original experiments and model was created in DistBelief, a completely different framework pre-dating Tensorflow.
The TF version was added a year later and might have had discrepancies from the original model, however it was made sure to achieve similar results.
关于keras - InceptionResnetV2 STEM block keras implementation 与原始论文中的不匹配?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64488034/
我经常在 C 标准文档中看到“实现定义”的说法,并且非常将其作为答案。 然后我在 C99 标准中搜索它,并且: ISO/IEC 9899/1999 (C99) 中第 §3.12 条规定: 3.12 I
“依赖于实现”中的“实现”是什么意思? “依赖于实现”和“依赖于机器”之间有什么区别? 我使用C,所以你可以用C解释它。 最佳答案 当 C 标准讨论实现时,它指的是 C 语言的实现。因此,C 的实现就
我刚刚在 Android-studio 中导入了我的项目,并试图在其中创建一个新的 Activity。但我无法在 android-studio 中创建 Activity 。我指的是here我看不到将目
我想知道您对为什么会发生此错误的意见。在陆上生产环境中,我们使用 CDH4。在我们的本地测试环境中,我们只使用 Apache Hadoop v2.2.0。当我运行在 CDH4 上编译的同一个 jar
我正在尝试集成第三方 SDK (DeepAR)。但是当我构建它时,它会显示一个错误。我试图修复它。如果我创建一个简单的新项目,它就可以正常工作。但是我现有的应用程序我使用相机和 ndk。请帮我找出错误
我很好奇为什么我们有 @Overrides 注释,但接口(interface)没有类似的习惯用法(例如 @Implements 或 @Implementation)。这似乎是一个有用的功能,因为您可能
我对 DAODatabase(适用于 Oracle 11 xe)的 CRUD 方法的实现感到困惑。问题是,在通常存储到 Map 集合的情况下,“U”方法(更新)会插入新元素或更新它(像 ID:Abst
Java-API 告诉我特定类实现了哪些接口(interface)。但有两种不同类型的信息,我不太确定这意味着什么。例如,对于“TreeSet”类:https://docs.oracle.com/en
我有一个接口(interface) MLService,它具有与机器学习算法的训练和交叉验证相关的基本方法,我必须添加两个接口(interface)分类和预测,它们将实现 MLService 并包含根
我一直想知道如何最好地为所有实现相同接口(interface)的类系列实现 equals()(并且客户端应该只使用所述接口(interface)并且永远不知道实现类)。 我还没有编写自己的具体示例,但
我有一个接口(interface)及其 2 个或更多实现, public interface IProcessor { default void method1() { //logic
我有同一个应用程序的免费版和高级版(几乎相同的代码,相同的类,到处都是“if”, list 中的不同包, list 中的进程名称相同)。主要 Activity 使用 IMPLICIT Intent 调
这是我为我的应用程序中的错误部分编写的代码 - (id)initWithData:(NSData *)data <-------- options:(NSUInteger)opti
请查找随附的代码片段。我正在使用此代码将文件从 hdfs 下载到我的本地文件系统 - Configuration conf = new Configuration(); FileSys
我想在 MongoDB 中使用 Grails2.5 中的“ElasticSearch”插件。我的“BuildConfig.groovy”文件是: grails.servlet.version = "3
我收到一条错误消息: fatal error: init(coder:) has not been implemented 对于我的自定义 UITableViewCell。该单元格未注册,在 Stor
得到这个错误 kotlin.NotImplementedError: An operation is not implemented: not implemented 我正在实现一个 ImageBut
typedef int Element; typedef struct { Element *stack; int max_size; int top; } Stack; //
Playground 代码 here 例子: interface IFoo { bar: number; foo?: () => void; } abstract class Abst
我想知道如何抑制警告: Category is implementing a method which will also be implemented by its primary class. 我
我是一名优秀的程序员,十分优秀!