frames_count = numpy.array(
                    range(begin_frame[i], end_frame[i] + 1))
                pred_label_temp = ((pred_label[i] - 1) * 10 + 5) * numpy.ones(
                    len(frames_count))
                plt.plot(frames_count,
                         pred_label_temp,
                         color='#ffff00',
                         linewidth=2.0)

            plt.show()
        else:
            print "Elapsed time %d sec" % int(time.time() - time_tic)

            pred = []
            for i in range(len(begin_frame)):
                pred.append([pred_label[i], begin_frame[i], end_frame[i]])

            smp.exportPredictions(pred, outPred)

    # ###############################################
    ## delete the sample
        del smp

TruthDir = './training/gt/'
final_score = evalGesture(outPred, TruthDir)
print("The score for this prediction is " + "{:.12f}".format(final_score))
# Submision folder (output)
outSubmision = './training/submision/'
# Prepare submision file (only for validation and final evaluation data sets)
createSubmisionFile(outPred, outSubmision)
        save_dir=r'.\ConvNet_3DCNN\training\Test_Depth_'+ CNN_NAME
        if not os.path.exists(save_dir):
            os.makedirs(save_dir)            
        save_path= os.path.join(save_dir,file)
        out_file = open(save_path, 'wb')
        dic = {'log_observ_likelihood':log_observ_likelihood}
        cPickle.dump(dic, out_file, protocol=cPickle.HIGHEST_PROTOCOL)
        out_file.close()


        pred=[]
        for i in range(len(begin_frame)):
            pred.append([ pred_label[i], begin_frame[i], end_frame[i]] )

        smp.exportPredictions(pred,outPred)
        # ###############################################
        ## delete the sample
        del smp          
        

  

TruthDir=r'I:\Kaggle_multimodal\ChalearnLAP2104_EvaluateTrack3\input\ref//'
CNN_NAME = 'ConvNet__2014-05-28_01.59.00_150'
outPred='./ConvNet_3DCNN/training/Test_3DCNN_' + CNN_NAME
final_score = evalGesture(outPred,TruthDir)         
print("The score for this prediction is " + "{:.12f}".format(final_score))
# Submision folder (output)
outSubmision='./training/submision/'
# Prepare submision file (only for validation and final evaluation data sets)