зеркало из https://github.com/mozilla/kaldi.git
trunk,nnet: setting output of python scripts to use buffering, adding apache headers
git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@3256 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
This commit is contained in:
Родитель
a9c8b965cc
Коммит
55f5c00c4c
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
# Copyright 2012 Karel Vesely
|
||||
# Copyright 2012 Brno University of Technology (author: Karel Vesely)
|
||||
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
# Copyright 2012 Karel Vesely
|
||||
# Copyright 2012 Brno University of Technology (author: Karel Vesely)
|
||||
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,10 +1,24 @@
|
|||
#!/usr/bin/python -u
|
||||
#!/usr/bin/python
|
||||
|
||||
# Copyright 2012 Brno University of Technology (author: Karel Vesely)
|
||||
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||||
# WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||||
# MERCHANTABLITY OR NON-INFRINGEMENT.
|
||||
# See the Apache 2 License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# ./gen_dct_mat.py
|
||||
# script generates matrix with DCT transform
|
||||
#
|
||||
# author: Karel Vesely
|
||||
#
|
||||
# script generates matrix with DCT transform, which is sparse
|
||||
# and takes into account that data-layout is along frequency axis,
|
||||
# while DCT is done along temporal axis.
|
||||
|
||||
from math import *
|
||||
import sys
|
||||
|
@ -34,7 +48,7 @@ M_PI = 3.1415926535897932384626433832795
|
|||
M_SQRT2 = 1.4142135623730950488016887
|
||||
|
||||
|
||||
#generate small DCT matrix
|
||||
#generate sparse DCT matrix
|
||||
print '['
|
||||
for k in range(dct_basis):
|
||||
for m in range(dim):
|
||||
|
|
|
@ -1,10 +1,22 @@
|
|||
#!/usr/bin/python -u
|
||||
#!/usr/bin/python
|
||||
|
||||
# Copyright 2012 Brno University of Technology (author: Karel Vesely)
|
||||
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||||
# WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||||
# MERCHANTABLITY OR NON-INFRINGEMENT.
|
||||
# See the Apache 2 License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# ./gen_hamm_mat.py
|
||||
# script generates diagonal matrix with hamming window values
|
||||
#
|
||||
# author: Karel Vesely
|
||||
#
|
||||
|
||||
from math import *
|
||||
import sys
|
||||
|
|
|
@ -1,10 +1,22 @@
|
|||
#!/usr/bin/python -u
|
||||
#!/usr/bin/python
|
||||
|
||||
# Copyright 2010-2013 Brno University of Technology (author: Karel Vesely)
|
||||
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||||
# WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||||
# MERCHANTABLITY OR NON-INFRINGEMENT.
|
||||
# See the Apache 2 License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# ./gen_mlp_init.py
|
||||
# script generateing NN initialization
|
||||
#
|
||||
# author: Karel Vesely
|
||||
#
|
||||
|
||||
import math, random
|
||||
import sys
|
||||
|
@ -42,6 +54,7 @@ for i in range(len(dimStrL)):
|
|||
|
||||
|
||||
#print dimL,'linBN',options.linBNdim
|
||||
print '<Nnet>'
|
||||
|
||||
for layer in range(len(dimL)-1):
|
||||
print '<affinetransform>', dimL[layer+1], dimL[layer]
|
||||
|
@ -86,6 +99,8 @@ for layer in range(len(dimL)-1):
|
|||
#print '<sigmoid>', dimL[layer+1], dimL[layer+1]
|
||||
print options.activation, dimL[layer+1], dimL[layer+1]
|
||||
|
||||
print '</Nnet>'
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,13 +1,22 @@
|
|||
#!/usr/bin/python -u
|
||||
#!/usr/bin/python
|
||||
|
||||
# egs/wsj/s2/scripts/gen_rbm_init.py
|
||||
# Copyright 2012 Brno University of Technology (author: Karel Vesely)
|
||||
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# Copyright 2012 Karel Vesely
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Initializes the RBM Neural Network
|
||||
# THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||||
# WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||||
# MERCHANTABLITY OR NON-INFRINGEMENT.
|
||||
# See the Apache 2 License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
#
|
||||
# calling example:
|
||||
# python gen_mlp_init.py --dimIn=598 --dimOut=135 --dimHid=1024:1024:1024
|
||||
# Initialization of single RBM (``layer'')
|
||||
#
|
||||
|
||||
import math, random
|
||||
|
|
|
@ -1,11 +1,22 @@
|
|||
#!/usr/bin/python -u
|
||||
#!/usr/bin/python
|
||||
|
||||
# Copyright 2012 Brno University of Technology (author: Karel Vesely)
|
||||
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||||
# WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||||
# MERCHANTABLITY OR NON-INFRINGEMENT.
|
||||
# See the Apache 2 License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# ./gen_splice.py
|
||||
# script generates splice nnet transfrom
|
||||
#
|
||||
#
|
||||
# author: Karel Vesely
|
||||
#
|
||||
# generates <splice> Component
|
||||
|
||||
from math import *
|
||||
import sys
|
||||
|
|
|
@ -35,6 +35,7 @@ in_dim=$1
|
|||
out_dim=$2
|
||||
nnet_out=$3
|
||||
dir=$(dirname $nnet_out)
|
||||
[ ! -d $dir ] && mkdir -p $dir
|
||||
|
||||
###
|
||||
### What is the topology? Straight or bottleneck?
|
||||
|
|
Загрузка…
Ссылка в новой задаче