Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
Order changed
Browse files Browse the repository at this point in the history
  • Loading branch information
petteriTeikari committed Feb 7, 2017
1 parent 56f490a commit 1402866
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
6 changes: 3 additions & 3 deletions fcn16_vgg.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ def build(self, rgb, train=False, num_classes=20, random_init_fc8=False,

with tf.name_scope('Processing'):
# rgb = tf.image.convert_image_dtype(rgb, tf.float32)
red, green, blue = tf.split(rgb, 3, 3)
red, green, blue = tf.split(3, 3, rgb)
# assert red.get_shape().as_list()[1:] == [224, 224, 1]
# assert green.get_shape().as_list()[1:] == [224, 224, 1]
# assert blue.get_shape().as_list()[1:] == [224, 224, 1]
bgr = tf.concat([
bgr = tf.concat(3, [
blue - VGG_MEAN[0],
green - VGG_MEAN[1],
red - VGG_MEAN[2]], axis=3)
red - VGG_MEAN[2]])

if debug:
bgr = tf.Print(bgr, [tf.shape(bgr)],
Expand Down
7 changes: 3 additions & 4 deletions fcn32_vgg.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,14 @@ def build(self, rgb, train=False, num_classes=20, random_init_fc8=False,

with tf.name_scope('Processing'):

red, green, blue = tf.split(rgb, 3, 3)
red, green, blue = tf.split(3, 3, rgb)
# assert red.get_shape().as_list()[1:] == [224, 224, 1]
# assert green.get_shape().as_list()[1:] == [224, 224, 1]
# assert blue.get_shape().as_list()[1:] == [224, 224, 1]
bgr = tf.concat([
bgr = tf.concat(3, [
blue - VGG_MEAN[0],
green - VGG_MEAN[1],
red - VGG_MEAN[2],
], 3)
red - VGG_MEAN[2]])

if debug:
bgr = tf.Print(bgr, [tf.shape(bgr)],
Expand Down
7 changes: 3 additions & 4 deletions fcn8_vgg.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,14 @@ def build(self, rgb, train=False, num_classes=20, random_init_fc8=False,

with tf.name_scope('Processing'):

red, green, blue = tf.split(rgb, 3, 3)
red, green, blue = tf.split(3, 3, rgb)
# assert red.get_shape().as_list()[1:] == [224, 224, 1]
# assert green.get_shape().as_list()[1:] == [224, 224, 1]
# assert blue.get_shape().as_list()[1:] == [224, 224, 1]
bgr = tf.concat([
bgr = tf.concat(3, [
blue - VGG_MEAN[0],
green - VGG_MEAN[1],
red - VGG_MEAN[2],
], 3)
red - VGG_MEAN[2]])

if debug:
bgr = tf.Print(bgr, [tf.shape(bgr)],
Expand Down

0 comments on commit 1402866

Please sign in to comment.