We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e20ac1a commit 91e8cdbCopy full SHA for 91e8cdb
scripts/siamese_model.py
@@ -51,7 +51,7 @@ def xavier_init(self,n_inputs, n_outputs, uniform=True):
51
52
def fc_layer(self, bottom, n_weight, name):
53
print( bottom.get_shape())
54
- n_prev_weight = bottom.get_shape()[1]
+ n_prev_weight = int(bottom.get_shape()[1])
55
initer = self.xavier_init(int(n_prev_weight),n_weight)
56
W = tf.get_variable(name+'W', dtype=tf.float32, shape=[n_prev_weight, n_weight], initializer=initer)
57
b = tf.get_variable(name+'b', dtype=tf.float32, initializer=tf.random_uniform([n_weight],-0.001,0.001, dtype=tf.float32))
0 commit comments