Skip to content

Commit

Permalink
fixing dropout issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeret committed Jun 14, 2018
1 parent 62205a9 commit 62f9820
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tf_unet/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def bias_variable(shape):

def conv2d(x, W, b, keep_prob_):
conv_2d = tf.nn.conv2d(x, W, strides=[1, 1, 1, 1], padding='VALID')
conv_2d_b = tf.nn.bias_add(conv2d, b)
conv_2d_b = tf.nn.bias_add(conv_2d, b)
return tf.nn.dropout(conv_2d_b, keep_prob_)

def deconv2d(x, W,stride):
Expand Down
2 changes: 1 addition & 1 deletion tf_unet/unet.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def create_conv_net(x, keep_prob, channels, n_class, layers=3, features_root=16,
# Output Map
weight = weight_variable([1, 1, features_root, n_class], stddev)
bias = bias_variable([n_class])
conv = conv2d(in_node, weight, tf.constant(1.0))
conv = conv2d(in_node, weight, bias, tf.constant(1.0))
output_map = tf.nn.relu(conv + bias)
up_h_convs["out"] = output_map

Expand Down

0 comments on commit 62f9820

Please sign in to comment.