sebastianruder / sluice-networks Goto Github PK
View Code? Open in Web Editor NEWCode for Sluice networks: Learning what to share between loosely related tasks
Code for Sluice networks: Learning what to share between loosely related tasks
When i run with
python3 run_sluice_net.py --dynet-autobatch 1 --dynet-seed 123
--task-names pos ner --h-layers 3 --pred-layer 3 3
--cross-stitch --layer-connect stitch
--num-subspaces 2 --constraint-weight 0.1
--constrain-matrices 1 2 --patience 3
--train-dir conll-formatted-ontonotes-5.0/data/train
--dev-dir conll-formatted-ontonotes-5.0/data/development
--test-dir conll-formatted-ontonotes-5.0/data/test
--train bc --test bn mz nw wb
--model-dir model/pos_3__ner_3bc_mz --log-dir logs
I get the error
Reading training data from conll-formatted-ontonotes-5.0/data/train...
Traceback (most recent call last):
File "run_sluice_net.py", line 231, in
main(args)
File "run_sluice_net.py", line 119, in main
train_dir=args.train_dir, dev_dir=args.dev_dir)
File "/Users/uday.kamath/sluice-networks-master/sluice_net.py", line 264, in fit
[train_domain], self.task_names, data_dir=train_dir, train=True)
File "/Users/uday.kamath/sluice-networks-master/utils.py", line 319, in get_data
'%s.' % domain)
AssertionError: No data read for bc.
Error:
Output layers: 2
Training model with sgd for 30 epochs and patience of 3.
Training epoch 1/30...Traceback (most recent call last):
File "run_sluice_net.py", line 231, in
main(args)
File "run_sluice_net.py", line 119, in main
train_dir=args.train_dir, dev_dir=args.dev_dir)
File "/home/ant/multitask/sluice-networks/sluice_net.py", line 319, in fit
output, penalty = self.predict(features, task, train=True)
File "/home/ant/multitask/sluice-networks/sluice_net.py", line 408, in predict
penalty = dynet.parameter(self.subspace_penalty, update=False)
TypeError: parameter() got an unexpected keyword argument 'update'
Duplicate (see closed issues).
The reason is that different format of the dataset is used. If you have the same issue check that you have files ending '*.gold_conll'. If you don't search again for the 'correct' dataset.
After solving the TypeError: parameter() got an unexpected keyword argument 'update'
with the following modification:
- penalty = dynet.parameter(self.subspace_penalty, update=False)
+ print ("self.subspace_penalty", self.subspace_penalty)
I have yet another error:
Training epoch 1/30...task_name pos
output_expected_at_layer 2
self.subspace_penalty <_dynet.Parameters object at 0x7fbaf3d664c8>
len(lstm_parameters) 3
W_shape (400, 100)
W_shape (400,)
Traceback (most recent call last):
File "run_sluice_net.py", line 231, in
main(args)
File "run_sluice_net.py", line 119, in main
train_dir=args.train_dir, dev_dir=args.dev_dir)
File "/home/ant/multitask/sluice-networks/sluice_net.py", line 319, in fit
output, penalty = self.predict(features, task, train=True)
File "/home/ant/multitask/sluice-networks/sluice_net.py", line 446, in predict
self.num_subspaces), W_shape[1]))
IndexError: tuple index out of range
I really appreciate your contribution of relevant knowledge. I have benefited a lot. But the data seems to have expired. Could you please provide a new one? Thank you very much.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.