Capsule icon indicating copy to clipboard operation
Capsule copied to clipboard

A Capsule Implement with Pure Keras

Results 10 Capsule issues
Sort by recently updated
recently updated
newest added

大神您好。 阅读你关于capsule的三篇文章收益良多。 参考你的代码,换了一个数据集,迭代次数比你例子多,也会出现loss为nan的情况。按你的提升替换了squash中的K.epsilon()为0.001,并没有解决这个问题。 请问是什么地方会导致这个计算结果呢?

Why in the last con2d layer the activation function is relu and not the squash function ? shouldn't it be the squash function ?

b = K.batch_dot(o, u_hat_vecs, [2, 3]) ValueError: Can not do batch_dot on inputs with shapes (None, 10, 10, 16) and (None, 10, None, 16) with axes=[2, 3]. x.shape[2] != y.shape[3]...

The program is leaving me an error while running For "cnn = Conv2D(64, (3, 3), activation='relu')(input_image)" in line 41 An error returns like "ValueError: The channel dimension of the inputs...

Hi; I could'nt understand why the following line is needed in test code? `cnn = Reshape((-1, 128))(cnn)` and what does 128 correspond here? thanks in advance

执行这一句的时候 greater = np.sort(Y_pred, axis=1)[:,-2] > 0.5 #判断预测结果是否大于0.5 遇到一个问题 numpy.core._internal.AxisError: axis 1 is out of bounds for array of dimension 1 不知道怎么解决了。谢谢。

非常感谢的作者的sharing. 我想用Capsule来尝试处理regression的问题,想法是最后吧vector 用neural转换成一个scalar,不知道这么做是否靠谱。

当embedding_dim=768或者是embedding=300, 也就是说如何接词向量model和bert, 参数如何设设置

你好,有个问题想请教以下: ```python #搭建CNN+Capsule分类模型 input_image = Input(shape=(None,None,1)) cnn = Conv2D(64, (3, 3), activation='relu')(input_image) cnn = Conv2D(64, (3, 3), activation='relu')(cnn) cnn = AveragePooling2D((2,2))(cnn) cnn = Conv2D(128, (3, 3), activation='relu')(cnn) cnn = Conv2D(128,...

請問一下蘇大,由於您的capsule_test裏的前一層採用了: Reshape((-1,128))應該是對應於primary capsule, 這是否是對應於128 capsule的dim而非數量? 因為我稍微看了一下原本Hinton的paper和下面這個實現 https://github.com/XifengGuo/CapsNet-Keras 似乎都把8-dim 當作primary capsule的特徵維度。 雖然說dim和num就算反過來也完全可以做運算, 只是想問一下跟原paper之間的關係是否是想選擇128當作capsule num? P.S. Blog真的解釋得非常好,真的獲益良多,感謝