示例#1
0
 def __calc_fc7(self):
     # 7th Layer: FC (w ReLu)
     self.fc7 = tf.nn.relu(
         fc(self.fc6,
            4096,
            4096,
            name='fc7',
            data=self.weights_data,
            retrain_layers=self.retrain_layers))
示例#2
0
 def __calc_fc6(self):
     # 6th Layer: Flatten -> FC (w ReLu)
     flattened = tf.reshape(self.pool5, [-1, 6 * 6 * 256])
     self.fc6 = tf.nn.relu(
         fc(flattened,
            6 * 6 * 256,
            4096,
            name='fc6',
            data=self.weights_data,
            retrain_layers=self.retrain_layers))
示例#3
0
 def __calc_fc6(self):
     # 6th Layer: Flatten -> FC (w ReLu)
     self.pool_6 = avg_pool(self.conv5_3,
                            7,
                            7,
                            7,
                            7,
                            padding='SAME',
                            name='pool6')
     flattened = tf.reshape(self.pool_6, [-1, 1 * 1 * 2048])
     self.fc6 = fc(flattened,
                   1 * 1 * 2048,
                   1000,
                   name='fc1000',
                   data=self.weights_data,
                   retrain_layers=self.retrain_layers)
示例#4
0
 def __calc_fc8(self):
     self.fc8 = fc(self.fc7, 4096, 1000, name='fc8', data=self.weights_data,
                              retrain_layers=self.retrain_layers)
示例#5
0
 def __calc_fc6(self):
     flattened = tf.reshape(self.pool5, [-1, 7 * 7 * 512])
     self.fc6 = tf.nn.relu(fc(flattened, 7 * 7 * 512, 4096, name='fc6', data=self.weights_data,
                              retrain_layers=self.retrain_layers))
示例#6
0
 def __calc_fc8(self):
     # 8th Layer: FC and return unscaled activations
     self.fc8 = fc(self.fc7, 4096, 1000, name='fc8', data=self.weights_data)