outputs2, variables2, _ = tft.volume_bndo_flbias_l6_40( inputs_reshape[2], dropout_rate=0.0, batch_normalization_statistic=False, bn_params=bn_params[2]) if FUSION_MODE == 'vote': predictions = [ outputs0['sm_out'], outputs1['sm_out'], outputs2['sm_out'] ] combined_prediction = tft.vote_fusion(predictions) combined_prediction = tf.reshape(combined_prediction, [-1, 1]) elif FUSION_MODE == 'committe': predictions = [ outputs0['sm_out'], outputs1['sm_out'], outputs2['sm_out'] ] combined_prediction = tft.committe_fusion(predictions) elif FUSION_MODE == 'late': features = [ outputs0['flattened_out'], outputs1['flattened_out'], outputs2['flattened_out'] ] _, combined_prediction, variables_fusion = tft.late_fusion( features, False) else: print("unknown fusion mode") exit() saver0 = tf.train.Saver(variables0) saver1 = tf.train.Saver(variables1) saver2 = tf.train.Saver(variables2) if FUSION_MODE == 'late':
volumes_reshape[2], False, dropout_rate=0.0, batch_normalization_statistic=False, bn_params=bn_params[2]) if FUSION_MODE == 'late': features = [ net_outs0['flattened_out'], net_outs1['flattened_out'], net_outs2['fc1_out'] ] _, softmax_out, variables_fusion = tft.late_fusion(features, True) elif FUSION_MODE == 'committe': predictions = [ net_outs0['sm_out'], net_outs1['sm_out'], net_outs2['sm_out'] ] softmax_out = tft.committe_fusion(predictions) correct_prediction = tf.equal(tf.argmax(softmax_out, 1), tf.argmax(real_label, 1)) batch_accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32)) if not AUGMENTATION: correct_output = open( vision_path + "/correct_predictions_" + FUSION_MODE + "_subset9.log", "w") incorrect_output = open( vision_path + "/incorrect_predictions_" + FUSION_MODE + "_subset9.log", "w") extract_volumes = [ ft.partial(mt.extract_volumes, volume_shape=np.int_(