tensorflow / neural-structured-learning

Training neural models with structured signals.
https://www.tensorflow.org/neural_structured_learning
Apache License 2.0
980 stars 189 forks source link

minor issue #39

Closed sezan92 closed 4 years ago

sezan92 commented 4 years ago

i saw some code mistake in the tensorflow blog of nsl. how can i correct it?

arjung commented 4 years ago

Thanks @sezan92. Could you provide more information on what the mistake is? I don't think you'd be able to edit the blog yourself.

sezan92 commented 4 years ago

here, https://medium.com/tensorflow/introducing-neural-structured-learning-in-tensorflow-5a802efd7afd

adv_model = nsl.keras.AdversarialRegularization(model, adv_config)

This line is mistake. i checked the source code. the adv_config should be third argument. second argument is a dict.

csferng commented 4 years ago

Thanks @sezan92 for reporting the issue. The adv_config is intended to be a keyword argument, so that line should be

adv_model = nsl.keras.AdversarialRegularization(model, adv_config=adv_config)

We will update the blog post soon.

csferng commented 4 years ago

The blog post has been updated.