From 69bb80b3c497226c6dfc662991115ddea9d124e8 Mon Sep 17 00:00:00 2001 From: 1kaiser Date: Mon, 22 Jan 2018 19:32:52 +0530 Subject: [PATCH 1/6] Update nets.py --- src/capsules/nets.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/capsules/nets.py b/src/capsules/nets.py index f70c783..8a0a52b 100644 --- a/src/capsules/nets.py +++ b/src/capsules/nets.py @@ -26,6 +26,10 @@ def capsules_v0(inputs, num_classes, iterations, name='CapsuleEM-V0'): nets, shape=[1, 1, 32, 32], strides=[1, 1, 1, 1], padding='VALID', pose_shape=[4, 4], name='capsule_init' ) # inputs: (poses, activations) -> capsule-conv 3x3x32x32x4x4, strides 2 -> (poses, activations) + nets = capsules_conv( + nets, shape=[3, 3, 32, 32], strides=[1, 3, 3, 1], iterations=iterations, name='capsule_conv0' + ) + nets = capsules_conv( nets, shape=[3, 3, 32, 32], strides=[1, 2, 2, 1], iterations=iterations, name='capsule_conv1' ) From a499ec0fe47217c2ea915ead356f6086133222e0 Mon Sep 17 00:00:00 2001 From: 1kaiser Date: Mon, 22 Jan 2018 20:25:29 +0530 Subject: [PATCH 2/6] Update nets.py --- src/capsules/nets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/capsules/nets.py b/src/capsules/nets.py index 8a0a52b..98b98f9 100644 --- a/src/capsules/nets.py +++ b/src/capsules/nets.py @@ -3,7 +3,7 @@ import tensorflow as tf -from core import _conv2d_wrapper, capsules_init, capsules_conv, capsules_fc +from capsules.core import _conv2d_wrapper, capsules_init, capsules_conv, capsules_fc slim = tf.contrib.slim From 00ff8b27edbe1222c662244ce9c28e99f21fd1f6 Mon Sep 17 00:00:00 2001 From: 1kaiser Date: Mon, 22 Jan 2018 20:26:15 +0530 Subject: [PATCH 3/6] Update settings.py --- src/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings.py b/src/settings.py index b782c08..3749068 100644 --- a/src/settings.py +++ b/src/settings.py @@ -4,7 +4,7 @@ from __future__ import division from __future__ import print_function -import capsules +from capsules import __init__ import tensorflow as tf From b3a26d9e1055362376b8549faa9270feb61025d1 Mon Sep 17 00:00:00 2001 From: 1kaiser Date: Mon, 22 Jan 2018 20:32:48 +0530 Subject: [PATCH 4/6] Update train.py --- src/train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/train.py b/src/train.py index b2b40cb..536e3a8 100644 --- a/src/train.py +++ b/src/train.py @@ -1,6 +1,6 @@ """A train script for matrix capsule with EM routing.""" -from settings import * +from settings import _init_ def main(_): From 93f4c9b476662f35ac2909653b959314eb1c3988 Mon Sep 17 00:00:00 2001 From: 1kaiser Date: Mon, 22 Jan 2018 20:40:35 +0530 Subject: [PATCH 5/6] Update train.py --- src/train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/train.py b/src/train.py index 536e3a8..d1e8533 100644 --- a/src/train.py +++ b/src/train.py @@ -1,6 +1,6 @@ """A train script for matrix capsule with EM routing.""" -from settings import _init_ +from settings import __init__ def main(_): From 80a66c9a96c3fb0a7cfdfa43b7f39fc8f5f4568d Mon Sep 17 00:00:00 2001 From: 1kaiser Date: Mon, 22 Jan 2018 22:51:42 +0530 Subject: [PATCH 6/6] Update train.py --- src/train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/train.py b/src/train.py index d1e8533..f5cc10b 100644 --- a/src/train.py +++ b/src/train.py @@ -1,6 +1,6 @@ """A train script for matrix capsule with EM routing.""" -from settings import __init__ +from . import settings def main(_):