Open aliabbasjp opened 7 years ago
Hi,
thanks for reporting!
It should actually work if you don't make any changes to the original main2.py script (I see you have removed the "p=p" line). Current implementation is rather memory inefficient -- even when there are no
@ottokart p=None as I dont have pause info.
@aliabbasjp yes, I understand, but try with unmodified code and follow the instructions in the readme (slighlty modified below):
Data preparation. In
python data.py <data_dir> <adaptation_data_dir>
The first stage can be trained with:
python main.py <model_name> <hidden_layer_size> <learning_rate>
Adaptation stage can be trained with:
python main2.py <adapted_model_name> <hidden_layer_size> <learning_rate> <first_stage_model_path>
Let me know, if you still get some error or if some parts of the readme are unclearly written.
ok I was manage to get it trained!
but on testing with punctuator.py I get following error, as I dont supply pause info on test set either.
if use_pauses:
print "Using pauses"
p = T.matrix('p')
print "Loading model parameters..."
net, _ = models.load(model_file, 1, x, p)
print "Building model..."
predict = theano.function(
inputs=[x, p],
outputs=net.y
)
Above code is used for loading the model gives following error:
self.inv_finder[c]))
TypeError: Missing required input: p
How can I give a dummy p in test set when I wont be having pause info during evaluation?
@ottokart Basically I only need target domain adaptation without pause features. So I need to send an empty array of pauses to run punctuator.py, how to do that?
added dummy pauses into punctuator.py script. Can you pull the new version and try something like:
cat data.dev.txt | python punctuator.py <model_path> <model_output_path> 1
That 1 in the end is important.
On adapting to previously trained model file over a new data set , I find above error, I dont supply any pause info so its by default null