Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion egs/wsj/s5/steps/libs/nnet3/xconfig/basic_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,8 @@ def set_default_configs(self):
self.config = {'input': '[-1]',
'dim': -1,
'cepstral-lifter': 22.0,
'affine-transform-file': ''}
'affine-transform-file': '',
'write-init-config': True}

def check_configs(self):
if self.config['affine-transform-file'] is None:
Expand Down Expand Up @@ -1030,6 +1031,13 @@ def get_full_config(self):
output_dim = self.output_dim()
transform_file = self.config['affine-transform-file']

if self.config['write-init-config']:
# to init.config we write an output-node with the name 'output' and
# with a Descriptor equal to the descriptor that's the input to this
# layer. This will be used to accumulate stats to learn the LDA transform.
line = 'output-node name=output input={0}'.format(descriptor_final_string)
ans.append(('init', line))

idct_mat = common_lib.compute_idct_matrix(
input_dim, output_dim, self.config['cepstral-lifter'])
# append a zero column to the matrix, this is the bias of the fixed
Expand Down