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

Fix misc bugs #340

Merged
merged 3 commits into from
Jun 13, 2023
Merged

Fix misc bugs #340

merged 3 commits into from
Jun 13, 2023

Conversation

ricardoV94
Copy link
Member

Closes #338
Closes #337
Closes #331

@ricardoV94 ricardoV94 added the bug Something isn't working label Jun 12, 2023
@@ -1598,8 +1598,8 @@ def L_op(self, inputs, outputs, gout):
second_part = switch(cond, 0.0, gz)

if outputs[0].type in discrete_types:
first_part = 0.0
second_part = 0.0
first_part = ift.zeros_like(config.floatX)
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't that usually take an array?

Copy link
Member Author

@ricardoV94 ricardoV94 Jun 13, 2023

Choose a reason for hiding this comment

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

This is a method of a PyTensor variable, it's equivalent to zeros_like(self) or something. It's used in a bunch of other grad implementations in this file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants