Revert "Fixed bugs in SLU example in CNTKBook (section 7.4)"
This reverts commit 435d6127d5
.
This commit is contained in:
Родитель
435d6127d5
Коммит
5e26505d0d
|
@ -125,11 +125,10 @@ namespace Microsoft { namespace MSR { namespace CNTK {
|
|||
if (outputFileIds.find(outputFile) == outputFileIds.end())
|
||||
{
|
||||
FILE* ofs;
|
||||
msra::files::make_intermediate_dirs(outputFile);
|
||||
string str(outputFile.begin(), outputFile.end());
|
||||
ofs = fopen(str.c_str(), "wt");
|
||||
if (ofs == nullptr)
|
||||
RuntimeError("Cannot open %s for writing", str.c_str());
|
||||
RuntimeError("Cannot open open %s for writing", str.c_str());
|
||||
outputFileIds[outputFile] = ofs;
|
||||
fp = ofs;
|
||||
}
|
||||
|
|
|
@ -329,7 +329,7 @@ LSTMTest=[
|
|||
|
||||
modelPath=$ExpDir$\cntkdebug.dnn
|
||||
|
||||
outputNodeNames=outputs:labels
|
||||
outputNodeNames=outputs
|
||||
|
||||
reader=[
|
||||
# reader to use
|
||||
|
@ -442,11 +442,6 @@ LSTMTest=[
|
|||
file=$OutDir$\output.rec.txt
|
||||
token=$DataDir$\output.txt
|
||||
]
|
||||
|
||||
labels=[
|
||||
file=$OutDir$\output.lbl.txt
|
||||
token=$DataDir$\output.txt
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# need to have outputs and labels
|
||||
# in this case is output.rec.txt and output.lbl.txt
|
||||
# need to have outputs
|
||||
# in this case is output.rec.txt
|
||||
|
||||
awk 'NF {str1=$1; getline < "output.rec.txt"; print str1" "$1 > "output.12.txt"}' feat.txt
|
||||
awk '{str1=$1; getline < "output.rec.txt"; print str1" "$1 > "output.12.txt"}' feat.txt
|
||||
|
||||
awk '{str1=$1; str2=$2; getline < "output.lbl.txt"; print str1" NNP "$1 " "str2 > "output.all.txt"}' output.12.txt
|
||||
awk '{str1=$1; str2=$2; getline < "lbl.txt"; print str1" NNP "$1 " "str2 > "output.all.txt"}' output.12.txt
|
||||
|
||||
cat output.all.txt | perl -ne '{chomp;s/\r//g;print $_,"\n";}' | perl conlleval.pl | head -10
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче