Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IRV update #1054

Merged
merged 9 commits into from Feb 3, 2018
Merged

IRV update #1054

merged 9 commits into from Feb 3, 2018

Conversation

miaecle
Copy link
Contributor

@miaecle miaecle commented Jan 28, 2018

This PR adds in:

  • Tensorgraph version of IRV with identical structure

  • TensorflowLogisticRegression is removed and standard sklearn logistic regression is used in examples and benchmark

out_tensor = tf.nn.l2_loss(self.IRVLayer.W) + \
tf.nn.l2_loss(self.IRVLayer.V) + tf.nn.l2_loss(self.IRVLayer.b) + \
tf.nn.l2_loss(self.IRVLayer.b2)
out_tensor = out_tensor * self.penalty
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IRV has l2 regularization, is there a better way to handle these extra loss values?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks fine.

@coveralls
Copy link

coveralls commented Jan 28, 2018

Coverage Status

Coverage increased (+0.4%) to 78.591% when pulling 751bfcd on miaecle:irv into 81b70ad on deepchem:master.

out_tensor = tf.nn.l2_loss(self.IRVLayer.W) + \
tf.nn.l2_loss(self.IRVLayer.V) + tf.nn.l2_loss(self.IRVLayer.b) + \
tf.nn.l2_loss(self.IRVLayer.b2)
out_tensor = out_tensor * self.penalty
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks fine.

@@ -1184,6 +1184,26 @@ def create_tensor(self, in_layers=None, set_tensors=True, **kwargs):
return out_tensor


class Sigmoid(Layer):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a docstring for this class along with a usage example?



class Slice(Layer):
""" Choose a slice of input given axis and order
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a usage example for this class in the docstring?

@@ -1531,6 +1551,27 @@ def create_tensor(self, in_layers=None, set_tensors=True, **kwargs):
return out_tensor


class SigmoidCrossEntropy(Layer):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a usage example and docstring for this class?



class TensorflowMultiTaskIRVClassifier(TensorflowLogisticRegression):
class IRVLayer(Layer):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a unit test for these and the other layers added?

@rbharath
Copy link
Member

@miaecle Thanks for porting! Made a few comments with requests for more docs and tests.

@miaecle
Copy link
Contributor Author

miaecle commented Jan 30, 2018

@rbharath Thanks for the review! Just added some more docstrings and unit tests, let me know if anything else could be improved.

@rbharath
Copy link
Member

rbharath commented Feb 1, 2018

@miaecle Thanks for the fixes! Would you mind adding tests that the new layers can be pickled? Sorry, I should have mentioned this on the original review!

As a heads up, I'm going to merge in #992 since that one's been open for a while. There might be some minor merge conflicts heading your way.

@miaecle
Copy link
Contributor Author

miaecle commented Feb 1, 2018

@rbharath No problem, I will handle it.

@rbharath
Copy link
Member

rbharath commented Feb 3, 2018

Thanks for the fixes!

LGTM

@rbharath rbharath merged commit f3ccbc9 into deepchem:master Feb 3, 2018
@miaecle miaecle deleted the irv branch April 10, 2018 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants