num_output: 4096
kernel_size: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
}
}
}
layer {
bottom: "fc7"
top: "fc7"
name: "relu7"
type: "ReLU"
}
layer {
bottom: "fc7"
top: "fc7"
name: "drop7"
type: "Dropout"
dropout_param {
dropout_ratio: 0.5
}
}
layer {
bottom: "fc7"
top: "fc8_synth_to_real"
name: "fc8_synth_to_real"
type: "Convolution"
# This parameter seems deprecated in V2
#strict_dim: false
# These parameter do not seem to be parsed in V2
#blobs_lr: 10
#blobs_lr: 20
#weight_decay: 1
#weight_decay: 0
# For V2 use these instead
param {
lr_mult: 10
decay_mult: 1
}
param {
lr_mult: 20
decay_mult: 0
}
convolution_param {
num_output: ${NUM_LABELS}
kernel_size: 1
weight_filler {
type: "gaussian"
std: 0.01
}
bias_filler {
type: "constant"
value: 0
}
}
}
layer {
bottom: "label"
top: "label_shrink"
name: "label_shrink"
type: "Interp"
interp_param {
shrink_factor: 8
pad_beg: -1
pad_end: 0
}
}
layer {
name: "loss"
type: "SoftmaxWithLoss"
bottom: "fc8_synth_to_real"
bottom: "label_shrink"
# This parameter seems deprecated in V2
# softmaxwithloss_param {
# #weight_source: "voc12/loss_weight/loss_weight_train.txt"
# ignore_label: 255
#}
# Use this instead for V2
loss_param {
ignore_label: 255
}
include: { phase: TRAIN }
}
layer {
name: "accuracy"
type: "SegAccuracy"
bottom: "fc8_synth_to_real"
bottom: "label_shrink"
top: "accuracy"
seg_accuracy_param {
ignore_label: 255
}
}
# layer {
# name: "im_data"
# type: IMSHOW
# bottom: "data"
# }
# layer {
# name: "im_scores"
# type: IMSHOW
# bottom: "fc8_pascal"
# }
layer {
name: "fc8_mat"
type: "MatWrite"
bottom: "fc8_synth_to_real"
mat_write_param {
#prefix: "voc12/features/${NET_ID}/${TEST_SET}/fc8/"
#source: "voc12/list/${TEST_SET}_id.txt"
prefix: "${EXP}/features/${NET_ID}/${TEST_SET}/fc8/"
source: "${EXP}/list/${TEST_SET}_id.txt"
strip: 0
period: 1
}
include: { phase: TEST }
}
===============TEST.PROTOTXT====================
# VGG 16-layer network convolutional finetuning
# Network modified to have smaller receptive field (128 pixels)
# and smaller stride (8 pixels) when run in convolutional mode.
#
# For alignment to work, we set:
# (1) input dimension equal to
# $n = 16 * k + 2$, e.g., 306 (for k = 19)
# (2) dimension after 4th max-pooling
# $m = 2 * k + 3$ (41 if k = 19)
# (3) interp dimension equal to
# $m + (m-1) * 7 = 8 * m - 7 = n + 15$, (321 if k = 19)
# (4) Crop 7 pixels at the begin and 8 pixels at the
# end of the interpolated signal to produce the expected $n$
#
name: "${NET_ID}"
layer {