joezhouwenxuan / self-regulation-employing-a-generative-adversarial-network-to-improve-event-detection Goto Github PK
View Code? Open in Web Editor NEWevent detection
event detection
In section 4.5 of the paper Ldiff is combined to the softmax loss using lambda to optimize Θd. As I understand it, it should be applied to Θg, not Θd since Ldiff is only a function of og and oghat
In the code there are two lambdas:
self.train_op_g = optimizer_g.minimize(self.g_loss + 0.1 * self.diff_loss, var_list=vars_g) self.total_loss = self.loss + self.l2_loss + self.diff_loss * 0.00001
and the diff loss is applied to g, not d.
Is the code the proper version ?
File "train.py", line 77, in
main()
File "train.py", line 58, in main
model = Model(config)
File "/home/zhou/文档/Self-regulation-Employing-a-Generative-Adversarial-Network-to-Improve-Event-Detection-master/model.py", line 42, in init
self.build()
File "/home/zhou/文档/Self-regulation-Employing-a-Generative-Adversarial-Network-to-Improve-Event-Detection-master/model.py", line 78, in build
name='feature_embedding'
File "/home/zhou/.local/lib/python3.6/site-packages/tensorflow/python/ops/embedding_ops.py", line 122, in embedding_lookup
return maybe_normalize(_do_gather(params[0], ids, name=name))
File "/home/zhou/.local/lib/python3.6/site-packages/tensorflow/python/ops/embedding_ops.py", line 42, in _do_gather
return array_ops.gather(params, ids, name=name)
File "/home/zhou/.local/lib/python3.6/site-packages/tensorflow/python/ops/gen_array_ops.py", line 1179, in gather
validate_indices=validate_indices, name=name)
File "/home/zhou/.local/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 767, in apply_op
op_def=op_def)
File "/home/zhou/.local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 2506, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/home/zhou/.local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1269, in init
self._traceback = _extract_stack()
InvalidArgumentError (see above for traceback): indices[0,0] = 531 is not in [0, 26)
[[Node: feature_embedding = Gather[Tindices=DT_INT32, Tparams=DT_FLOAT, _class=["loc:@feature_W"], validate_indices=true, _device="/job:localhost/replica:0/task:0/cpu:0"](feature_W/read, _arg_input_0_1)]]
I have the ACE 2005 corpus and in this code, it seems that the train.tks and train.tgs is just an example? I don't really understand how to generate these two files.
Besides, from my understanding, I can use the wordlist and labellist in the data folder directly but have to generate another wordvec file, am I right?
How to make sure the generator of GAN does not generate features randomly, that it can maximum the loss L(prediction, ground truth)?
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.