CNTK始终返回errorRate为0

时间:2017-01-17 06:55:31

标签: cntk

我是CNTK的新手,我正在尝试写一个cntk来训练德州扑克演奏动作的数据。但是,无论我如何更改我的cntk配置文件,我都会为每个训练数据获得相同的输出。

这是我的cntk文件:

            # CNTK Configuration File for creating a slot tagger and an intent tagger.

            command = Train:Output:Test

            makeMode = false ; traceLevel = 0 ; deviceId = -1

            rootDir = "." ; dataDir  = "$rootDir$" ; modelDir = "$rootDir$/Models"

            modelPath = "$modelDir$/slu.lstm"

            # The command to train the LSTM model
            Train = {
                action = "train"
                BrainScriptNetworkBuilder = {
                    featDim = 22   # contextual words are used as features: previous word, current word, next word.
                    hiddenDim = 300
                    maxLayer = 1
                    initScale = 1
                    labelDim = 1

                    # inputs
                    HandPercentage = Input {1}  
                    NoOfPlayersInPlay = Input {1}   
                    HeroPosition = Input {1}    
                    Pot = Input {1} 
                    PlayerPosition0 = Input {1} 
                    PlayerBettingSize0 = Input {1}
                    PlayerChips0 = Input {1}    
                    PlayerPosition1 = Input {1} 
                    PlayerBettingSize1 = Input {1}
                    PlayerChips1 = Input {1}
                    PlayerPosition2 = Input {1} 
                    PlayerBettingSize2 = Input {1}
                    PlayerChips2 = Input {1}    
                    PlayerPosition3 = Input {1} 
                    PlayerBettingSize3 = Input {1}  
                    PlayerChips3 = Input {1}
                    PlayerPosition4 = Input {1} 
                    PlayerBettingSize4 = Input {1}  
                    PlayerChips4 = Input {1}    
                    PlayerPosition5 = Input {1} 
                    PlayerBettingSize5 = Input {1}  
                    PlayerChips5 = Input {1}

                    features = RowStack(
                        HandPercentage: 
                        NoOfPlayersInPlay:  
                        HeroPosition:   
                        Pot:    
                        PlayerPosition0:    
                        PlayerBettingSize0:
                        PlayerChips0:   
                        PlayerPosition1:    
                        PlayerBettingSize1:
                        PlayerChips1:
                        PlayerPosition2:    
                        PlayerBettingSize2:
                        PlayerChips2:   
                        PlayerPosition3:    
                        PlayerBettingSize3: 
                        PlayerChips3:
                        PlayerPosition4:    
                        PlayerBettingSize4: 
                        PlayerChips4:   
                        PlayerPosition5:    
                        PlayerBettingSize5: 
                        PlayerChips5
                    )

                    labels = Input {labelDim}

                    # build the LSTM stack
                    # lstmDims[i:0..maxLayer-1] = hiddenDim
                    # NoAuxInputHook (input, lstmState) = BS.Constants.None
                    # lstmStack = BS.RNNs.RecurrentLSTMPStack (lstmDims, 
                    #     cellDims=lstmDims,
                    #     features, 
                    #     inputDim=featDim,
                    #     previousHook=BS.RNNs.PreviousHC,
                    #     augmentInputHook=BS.RNNs.NoAuxInputHook, 
                    #     augmentInputDim=0,
                    #     enableSelfStabilization=false)
                    # 
                    # lstmOutputLayer = Length (lstmStack)-1
                    # LSTMoutput = lstmStack[lstmOutputLayer].h
                    # 
                    # W = Parameter(labelDim, hiddenDim, init = "uniform", initValueScale=initScale)
                    # b = Parameter(labelDim, 1, init = "fixedValue", value=0)
                    # outputs = W * LSTMoutput + b

                    model = Sequential (
                        RecurrentLSTMLayer {hiddenDim, goBackwards=false} :  # LSTM
                        DenseLayer {labelDim}   # output layer
                    )

                    # model application
                    outputs = model (features)

                    cr = CrossEntropyWithSoftmax(labels, outputs)
                    errs = ClassificationError(labels, outputs)

                    featureNodes = (HandPercentage: 
                        NoOfPlayersInPlay:  
                        HeroPosition:   
                        Pot:    
                        PlayerPosition0:    
                        PlayerBettingSize0:
                        PlayerChips0:   
                        PlayerPosition1:    
                        PlayerBettingSize1:
                        PlayerChips1:
                        PlayerPosition2:    
                        PlayerBettingSize2:
                        PlayerChips2:   
                        PlayerPosition3:    
                        PlayerBettingSize3: 
                        PlayerChips3:
                        PlayerPosition4:    
                        PlayerBettingSize4: 
                        PlayerChips4:   
                        PlayerPosition5:    
                        PlayerBettingSize5: 
                        PlayerChips5)

                    labelNodes  = (labels)
                    criterionNodes = (cr)
                    evaluationNodes = (errs)
                    outputNodes = (outputs)
                }

                SGD = {
                    maxEpochs = 10 ; epochSize = 5000

                    minibatchSize = 70

                    learningRatesPerSample = 1
                    gradUpdateType = "fsAdaGrad"
                }

                reader = {
                    readerType = "CNTKTextFormatReader"
                    file = "preflopData.txt"
                    randomize = true

                    input = [

                        #|HandPercentage 0.5958 
                        HandPercentage = [
                            dim = 1
                            format = "dense"
                        ]

                        #|NoOfPlayersInPlay 2   
                        NoOfPlayersInPlay = [
                            dim = 1
                            format = "dense"
                        ]

                        #|HeroPosition 5    
                        HeroPosition = [
                            dim = 1
                            format = "dense"
                        ]

                        #|Pot 1.0000
                        Pot = [
                            dim = 1
                            format = "dense"
                        ]

                        #|PlayerPosition0 0 
                        PlayerPosition0 = [
                            dim = 1
                            format = "dense"
                        ]

                        #|PlayerBettingSize0 0.00   
                        PlayerBettingSize0 = [
                            dim = 1
                            format = "dense"
                        ]

                        #|PlayerChips0 100.00   
                        PlayerChips0 = [
                            dim = 1
                            format = "dense"
                        ]

                        #|PlayerPosition1 1 
                        PlayerPosition1 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerBettingSize1 0.00   
                        PlayerBettingSize1 = [
                            dim = 1
                            format = "dense"
                        ]

                        #|PlayerChips1 100.00
                        PlayerChips1 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerPosition2 2 
                        PlayerPosition2 = [
                            dim = 1
                            format = "dense"
                        ]

                        #|PlayerBettingSize2 0.00   
                        PlayerBettingSize2 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerChips2 100.00
                        PlayerChips2 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerPosition3 3 
                        PlayerPosition3 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerBettingSize3 0.00   
                        PlayerBettingSize3 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerChips3 100.00
                        PlayerChips3 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerPosition4 4 
                        PlayerPosition4 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerBettingSize4 1.00   
                        PlayerBettingSize4 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerChips4 99.00
                        PlayerChips4 = [
                            dim = 1
                            format = "dense"
                        ]

                        #|PlayerPosition5 5 
                        PlayerPosition5 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerBettingSize5 0.00   
                        PlayerBettingSize5 = [
                            dim = 1
                            format = "dense"
                        ]

                        #|PlayerChips5 100.00
                        PlayerChips5 = [
                            dim = 1
                            format = "dense"
                        ]

                        #|Action 1
                        labels = [
                            alias = "Action"
                            dim = 1
                            format = "dense"
                        ]
                    ]
                }
            }

            # Test the model's accuracy (as an error count)
            Test = {
                action = "test"

                traceLevel = 1
                epochSize = 0

                defaultHiddenActivity = 0.1
                BrainScriptNetworkBuilder = [
                    labels = Input(1, tag = "label")
                    modelAsTrained = BS.Network.Load ("$modelPath$")
                    final = modelAsTrained.outputs
                    errorRate = ClassificationError(labels, final, tag='evaluation')
                ]

                evalNodeNames  = errorRate
                reader = {
                    readerType = "CNTKTextFormatReader"
                    file = "preflopData.txt"
                    randomize = false
                    input = [

                        #|HandPercentage 0.5958 
                        HandPercentage = [
                            dim = 1
                            format = "dense"
                        ]

                        #|NoOfPlayersInPlay 2   
                        NoOfPlayersInPlay = [
                            dim = 1
                            format = "dense"
                        ]

                        #|HeroPosition 5    
                        HeroPosition = [
                            dim = 1
                            format = "dense"
                        ]

                        #|Pot 1.0000
                        Pot = [
                            dim = 1
                            format = "dense"
                        ]

                        #|PlayerPosition0 0 
                        PlayerPosition0 = [
                            dim = 1
                            format = "dense"
                        ]

                        #|PlayerBettingSize0 0.00   
                        PlayerBettingSize0 = [
                            dim = 1
                            format = "dense"
                        ]

                        #|PlayerChips0 100.00   
                        PlayerChips0 = [
                            dim = 1
                            format = "dense"
                        ]

                        #|PlayerPosition1 1 
                        PlayerPosition1 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerBettingSize1 0.00   
                        PlayerBettingSize1 = [
                            dim = 1
                            format = "dense"
                        ]

                        #|PlayerChips1 100.00
                        PlayerChips1 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerPosition2 2 
                        PlayerPosition2 = [
                            dim = 1
                            format = "dense"
                        ]

                        #|PlayerBettingSize2 0.00   
                        PlayerBettingSize2 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerChips2 100.00
                        PlayerChips2 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerPosition3 3 
                        PlayerPosition3 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerBettingSize3 0.00   
                        PlayerBettingSize3 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerChips3 100.00
                        PlayerChips3 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerPosition4 4 
                        PlayerPosition4 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerBettingSize4 1.00   
                        PlayerBettingSize4 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerChips4 99.00
                        PlayerChips4 = [
                            dim = 1
                            format = "dense"
                        ]

                        #|PlayerPosition5 5 
                        PlayerPosition5 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerBettingSize5 0.00   
                        PlayerBettingSize5 = [
                            dim = 1
                            format = "dense"
                        ]

                        #|PlayerChips5 100.00
                        PlayerChips5 = [
                            dim = 1
                            format = "dense"
                        ]

                        #|Action 1
                        labels = [
                            alias = "Action"
                            dim = 1
                            format = "dense"
                        ]
                    ]
                }
            }


            # output the results
            Output = [
                action = "write"

                traceLevel = 1
                epochSize = 0

                defaultHiddenActivity = 0.1
                BrainScriptNetworkBuilder = [
                    modelAsTrained = BS.Network.Load ("$modelPath$")
                    final = modelAsTrained.outputs
                ]

                outputNodeNames = final
                reader = [
                    readerType = "CNTKTextFormatReader"
                    file = "preflopData.txt"
                    randomize = false
                    input = [

                        #|HandPercentage 0.5958 
                        HandPercentage = [
                            dim = 1
                            format = "dense"
                        ]

                        #|NoOfPlayersInPlay 2   
                        NoOfPlayersInPlay = [
                            dim = 1
                            format = "dense"
                        ]

                        #|HeroPosition 5    
                        HeroPosition = [
                            dim = 1
                            format = "dense"
                        ]

                        #|Pot 1.0000
                        Pot = [
                            dim = 1
                            format = "dense"
                        ]

                        #|PlayerPosition0 0 
                        PlayerPosition0 = [
                            dim = 1
                            format = "dense"
                        ]

                        #|PlayerBettingSize0 0.00   
                        PlayerBettingSize0 = [
                            dim = 1
                            format = "dense"
                        ]

                        #|PlayerChips0 100.00   
                        PlayerChips0 = [
                            dim = 1
                            format = "dense"
                        ]

                        #|PlayerPosition1 1 
                        PlayerPosition1 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerBettingSize1 0.00   
                        PlayerBettingSize1 = [
                            dim = 1
                            format = "dense"
                        ]

                        #|PlayerChips1 100.00
                        PlayerChips1 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerPosition2 2 
                        PlayerPosition2 = [
                            dim = 1
                            format = "dense"
                        ]

                        #|PlayerBettingSize2 0.00   
                        PlayerBettingSize2 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerChips2 100.00
                        PlayerChips2 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerPosition3 3 
                        PlayerPosition3 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerBettingSize3 0.00   
                        PlayerBettingSize3 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerChips3 100.00
                        PlayerChips3 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerPosition4 4 
                        PlayerPosition4 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerBettingSize4 1.00   
                        PlayerBettingSize4 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerChips4 99.00
                        PlayerChips4 = [
                            dim = 1
                            format = "dense"
                        ]

                        #|PlayerPosition5 5 
                        PlayerPosition5 = [
                            dim = 1
                            format = "dense"
                        ]


                        #|PlayerBettingSize5 0.00   
                        PlayerBettingSize5 = [
                            dim = 1
                            format = "dense"
                        ]

                        #|PlayerChips5 100.00
                        PlayerChips5 = [
                            dim = 1
                            format = "dense"
                        ]

                        #|Action 1
                        labels = [
                            alias = "Action"
                            dim = 1
                            format = "dense"
                        ]
                    ]
                ]
                outputPath = "Preflop_Result.txt"  # dump the output to this text file
            ]

培训文件中的数据如下:

            |HandPercentage 0.5958  |NoOfPlayersInPlay 2    |HeroPosition 5 |Pot 1.00   |PlayerPosition0 0  |PlayerBettingSize0 0.00    |PlayerChips0 100.00    |PlayerPosition1 1  |PlayerBettingSize1 0.00    |PlayerChips1 100.00    |PlayerPosition2 2  |PlayerBettingSize2 0.00    |PlayerChips2 100.00    |PlayerPosition3 3  |PlayerBettingSize3 0.00    |PlayerChips3 100.00    |PlayerPosition4 4  |PlayerBettingSize4 1.00    |PlayerChips4 99.00 |PlayerPosition5 5  |PlayerBettingSize5 0.00    |PlayerChips5 100.00    |Action 2
            |HandPercentage 0.5958  |NoOfPlayersInPlay 2    |HeroPosition 5 |Pot 2.00   |PlayerPosition0 0  |PlayerBettingSize0 0.00    |PlayerChips0 100.00    |PlayerPosition1 1  |PlayerBettingSize1 0.00    |PlayerChips1 100.00    |PlayerPosition2 2  |PlayerBettingSize2 0.00    |PlayerChips2 100.00    |PlayerPosition3 3  |PlayerBettingSize3 0.00    |PlayerChips3 100.00    |PlayerPosition4 4  |PlayerBettingSize4 2.00    |PlayerChips4 98.00 |PlayerPosition5 5  |PlayerBettingSize5 0.00    |PlayerChips5 100.00    |Action 1
            |HandPercentage 0.5958  |NoOfPlayersInPlay 2    |HeroPosition 5 |Pot 3.00   |PlayerPosition0 0  |PlayerBettingSize0 0.00    |PlayerChips0 100.00    |PlayerPosition1 1  |PlayerBettingSize1 0.00    |PlayerChips1 100.00    |PlayerPosition2 2  |PlayerBettingSize2 0.00    |PlayerChips2 100.00    |PlayerPosition3 3  |PlayerBettingSize3 0.00    |PlayerChips3 100.00    |PlayerPosition4 4  |PlayerBettingSize4 3.00    |PlayerChips4 97.00 |PlayerPosition5 5  |PlayerBettingSize5 0.00    |PlayerChips5 100.00    |Action 1
            |HandPercentage 0.5958  |NoOfPlayersInPlay 2    |HeroPosition 5 |Pot 4.00   |PlayerPosition0 0  |PlayerBettingSize0 0.00    |PlayerChips0 100.00    |PlayerPosition1 1  |PlayerBettingSize1 0.00    |PlayerChips1 100.00    |PlayerPosition2 2  |PlayerBettingSize2 0.00    |PlayerChips2 100.00    |PlayerPosition3 3  |PlayerBettingSize3 0.00    |PlayerChips3 100.00    |PlayerPosition4 4  |PlayerBettingSize4 4.00    |PlayerChips4 96.00 |PlayerPosition5 5  |PlayerBettingSize5 0.00    |PlayerChips5 100.00    |Action 1
            |HandPercentage 0.5958  |NoOfPlayersInPlay 2    |HeroPosition 5 |Pot 5.00   |PlayerPosition0 0  |PlayerBettingSize0 0.00    |PlayerChips0 100.00    |PlayerPosition1 1  |PlayerBettingSize1 0.00    |PlayerChips1 100.00    |PlayerPosition2 2  |PlayerBettingSize2 0.00    |PlayerChips2 100.00    |PlayerPosition3 3  |PlayerBettingSize3 0.00    |PlayerChips3 100.00    |PlayerPosition4 4  |PlayerBettingSize4 5.00    |PlayerChips4 95.00 |PlayerPosition5 5  |PlayerBettingSize5 0.00    |PlayerChips5 100.00    |Action 1
            |HandPercentage 0.5958  |NoOfPlayersInPlay 2    |HeroPosition 5 |Pot 6.00   |PlayerPosition0 0  |PlayerBettingSize0 0.00    |PlayerChips0 100.00    |PlayerPosition1 1  |PlayerBettingSize1 0.00    |PlayerChips1 100.00    |PlayerPosition2 2  |PlayerBettingSize2 0.00    |PlayerChips2 100.00    |PlayerPosition3 3  |PlayerBettingSize3 0.00    |PlayerChips3 100.00    |PlayerPosition4 4  |PlayerBettingSize4 6.00    |PlayerChips4 94.00 |PlayerPosition5 5  |PlayerBettingSize5 0.00    |PlayerChips5 100.00    |Action 1
            |HandPercentage 0.5958  |NoOfPlayersInPlay 2    |HeroPosition 5 |Pot 7.00   |PlayerPosition0 0  |PlayerBettingSize0 0.00    |PlayerChips0 100.00    |PlayerPosition1 1  |PlayerBettingSize1 0.00    |PlayerChips1 100.00    |PlayerPosition2 2  |PlayerBettingSize2 0.00    |PlayerChips2 100.00    |PlayerPosition3 3  |PlayerBettingSize3 0.00    |PlayerChips3 100.00    |PlayerPosition4 4  |PlayerBettingSize4 7.00    |PlayerChips4 93.00 |PlayerPosition5 5  |PlayerBettingSize5 0.00    |PlayerChips5 100.00    |Action 1
            |HandPercentage 0.5958  |NoOfPlayersInPlay 2    |HeroPosition 5 |Pot 8.00   |PlayerPosition0 0  |PlayerBettingSize0 0.00    |PlayerChips0 100.00    |PlayerPosition1 1  |PlayerBettingSize1 0.00    |PlayerChips1 100.00    |PlayerPosition2 2  |PlayerBettingSize2 0.00    |PlayerChips2 100.00    |PlayerPosition3 3  |PlayerBettingSize3 0.00    |PlayerChips3 100.00    |PlayerPosition4 4  |PlayerBettingSize4 8.00    |PlayerChips4 92.00 |PlayerPosition5 5  |PlayerBettingSize5 0.00    |PlayerChips5 100.00    |Action 1
            |HandPercentage 0.5958  |NoOfPlayersInPlay 2    |HeroPosition 5 |Pot 9.00   |PlayerPosition0 0  |PlayerBettingSize0 0.00    |PlayerChips0 100.00    |PlayerPosition1 1  |PlayerBettingSize1 0.00    |PlayerChips1 100.00    |PlayerPosition2 2  |PlayerBettingSize2 0.00    |PlayerChips2 100.00    |PlayerPosition3 3  |PlayerBettingSize3 0.00    |PlayerChips3 100.00    |PlayerPosition4 4  |PlayerBettingSize4 9.00    |PlayerChips4 91.00 |PlayerPosition5 5  |PlayerBettingSize5 0.00    |PlayerChips5 100.00    |Action 1
            |HandPercentage 0.5958  |NoOfPlayersInPlay 2    |HeroPosition 5 |Pot 100.00 |PlayerPosition0 0  |PlayerBettingSize0 0.00    |PlayerChips0 100.00    |PlayerPosition1 1  |PlayerBettingSize1 0.00    |PlayerChips1 100.00    |PlayerPosition2 2  |PlayerBettingSize2 0.00    |PlayerChips2 100.00    |PlayerPosition3 3  |PlayerBettingSize3 0.00    |PlayerChips3 100.00    |PlayerPosition4 4  |PlayerBettingSize4 100.00  |PlayerChips4 0.00  |PlayerPosition5 5  |PlayerBettingSize5 0.00    |PlayerChips5 100.00    |Action 1
            |HandPercentage 0.5958  |NoOfPlayersInPlay 2    |HeroPosition 5 |Pot 10.00  |PlayerPosition0 0  |PlayerBettingSize0 0.00    |PlayerChips0 100.00    |PlayerPosition1 1  |PlayerBettingSize1 0.00    |PlayerChips1 100.00    |PlayerPosition2 2  |PlayerBettingSize2 0.00    |PlayerChips2 100.00    |PlayerPosition3 3  |PlayerBettingSize3 0.00    |PlayerChips3 100.00    |PlayerPosition4 4  |PlayerBettingSize4 10.00   |PlayerChips4 90.00 |PlayerPosition5 5  |PlayerBettingSize5 0.00    |PlayerChips5 100.00    |Action 1
            |HandPercentage 0.5958  |NoOfPlayersInPlay 2    |HeroPosition 5 |Pot 15.00  |PlayerPosition0 0  |PlayerBettingSize0 0.00    |PlayerChips0 100.00    |PlayerPosition1 1  |PlayerBettingSize1 0.00    |PlayerChips1 100.00    |PlayerPosition2 2  |PlayerBettingSize2 0.00    |PlayerChips2 100.00    |PlayerPosition3 3  |PlayerBettingSize3 0.00    |PlayerChips3 100.00    |PlayerPosition4 4  |PlayerBettingSize4 15.00   |PlayerChips4 85.00 |PlayerPosition5 5  |PlayerBettingSize5 0.00    |PlayerChips5 100.00    |Action 1
            |HandPercentage 0.5958  |NoOfPlayersInPlay 2    |HeroPosition 5 |Pot 20.00  |PlayerPosition0 0  |PlayerBettingSize0 0.00    |PlayerChips0 100.00    |PlayerPosition1 1  |PlayerBettingSize1 0.00    |PlayerChips1 100.00    |PlayerPosition2 2  |PlayerBettingSize2 0.00    |PlayerChips2 100.00    |PlayerPosition3 3  |PlayerBettingSize3 0.00    |PlayerChips3 100.00    |PlayerPosition4 4  |PlayerBettingSize4 20.00   |PlayerChips4 80.00 |PlayerPosition5 5  |PlayerBettingSize5 0.00    |PlayerChips5 100.00    |Action 1
            |HandPercentage 0.5958  |NoOfPlayersInPlay 2    |HeroPosition 5 |Pot 30.00  |PlayerPosition0 0  |PlayerBettingSize0 0.00    |PlayerChips0 100.00    |PlayerPosition1 1  |PlayerBettingSize1 0.00    |PlayerChips1 100.00    |PlayerPosition2 2  |PlayerBettingSize2 0.00    |PlayerChips2 100.00    |PlayerPosition3 3  |PlayerBettingSize3 0.00    |PlayerChips3 100.00    |PlayerPosition4 4  |PlayerBettingSize4 30.00   |PlayerChips4 70.00 |PlayerPosition5 5  |PlayerBettingSize5 0.00    |PlayerChips5 100.00    |Action 1
            |HandPercentage 0.5958  |NoOfPlayersInPlay 2    |HeroPosition 5 |Pot 40.00  |PlayerPosition0 0  |PlayerBettingSize0 0.00    |PlayerChips0 100.00    |PlayerPosition1 1  |PlayerBettingSize1 0.00    |PlayerChips1 100.00    |PlayerPosition2 2  |PlayerBettingSize2 0.00    |PlayerChips2 100.00    |PlayerPosition3 3  |PlayerBettingSize3 0.00    |PlayerChips3 100.00    |PlayerPosition4 4  |PlayerBettingSize4 40.00   |PlayerChips4 60.00 |PlayerPosition5 5  |PlayerBettingSize5 0.00    |PlayerChips5 100.00    |Action 1

然而输出总是如下:

            Finished Epoch[ 1 of 10]: [Training] cr = -0.00000000 * 5000; errs = 0.000% * 5000; totalSamplesSeen = 5000; learningRatePerSample = 1; epochTime=0.784258s
            Finished Epoch[ 2 of 10]: [Training] cr = -0.00000000 * 5000; errs = 0.000% * 5000; totalSamplesSeen = 10000; learningRatePerSample = 1; epochTime=0.517457s
            Finished Epoch[ 3 of 10]: [Training] cr = -0.00000000 * 5000; errs = 0.000% * 5000; totalSamplesSeen = 15000; learningRatePerSample = 1; epochTime=0.50032s
            Finished Epoch[ 4 of 10]: [Training] cr = -0.00000000 * 5000; errs = 0.000% * 5000; totalSamplesSeen = 20000; learningRatePerSample = 1; epochTime=0.508821s
            Finished Epoch[ 5 of 10]: [Training] cr = -0.00000000 * 5000; errs = 0.000% * 5000; totalSamplesSeen = 25000; learningRatePerSample = 1; epochTime=0.519995s
            Finished Epoch[ 6 of 10]: [Training] cr = -0.00000000 * 5000; errs = 0.000% * 5000; totalSamplesSeen = 30000; learningRatePerSample = 1; epochTime=0.511545s
            Finished Epoch[ 7 of 10]: [Training] cr = -0.00000000 * 5000; errs = 0.000% * 5000; totalSamplesSeen = 35000; learningRatePerSample = 1; epochTime=0.524342s
            Finished Epoch[ 8 of 10]: [Training] cr = -0.00000000 * 5000; errs = 0.000% * 5000; totalSamplesSeen = 40000; learningRatePerSample = 1; epochTime=0.517396s
            Finished Epoch[ 9 of 10]: [Training] cr = -0.00000000 * 5000; errs = 0.000% * 5000; totalSamplesSeen = 45000; learningRatePerSample = 1; epochTime=0.527745s
            Finished Epoch[10 of 10]: [Training] cr = -0.00000000 * 5000; errs = 0.000% * 5000; totalSamplesSeen = 50000; learningRatePerSample = 1; epochTime=0.552185s

任何人都可以帮忙告诉我哪里可能有我的cntk错误?

1 个答案:

答案 0 :(得分:2)

您收到此结果是因为您在二进制标签上使用CrossEntropyWithSoftmax。您的问题有两种解决方案。一种解决方案是具有二维输出和标签1 00 1。另一种解决方案是通过sigmoid传递最终输出并使用Logistic操作。