Skip to content

Conversation

wangzhen38
Copy link
Contributor

@wangzhen38 wangzhen38 commented Dec 3, 2021

PR types

New features

PR changes

APIs

Describe

add logit API,you can use this function as follows:

// logit(x) = ln(1/(1-x))
import paddle
x = paddle.to_tensor([0.23, 0.45])
out = paddle.logit(x)

截屏2021-12-08 下午7 45 26

截屏2021-12-08 下午7 45 43

@paddle-bot-old
Copy link

paddle-bot-old bot commented Dec 3, 2021

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

type='atan2', inputs=inputs, outputs={'Out': out})
return out

def logit(x, eps=0.0, name=None):
Copy link
Contributor

Choose a reason for hiding this comment

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

default of eps should be None?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DONE

@jeff41404
Copy link
Contributor

this is elementwise operator, better to add in activation_op?

np.random.seed(10)


def logit(x, eps):
Copy link
Contributor

Choose a reason for hiding this comment

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

shall we add test case when eps is None?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DONE

@wangzhen38 wangzhen38 changed the title Logit wz add logit API Dec 9, 2021
@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Dec 10, 2021
@PaddlePaddle PaddlePaddle unlocked this conversation Dec 10, 2021
@wangzhen38
Copy link
Contributor Author

this is elementwise operator, better to add in activation_op?

DONE

Copy link
Contributor

@jeff41404 jeff41404 left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@Superjomn Superjomn left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@dingjiaweiww dingjiaweiww left a comment

Choose a reason for hiding this comment

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

LGTM

@frankwhzhang frankwhzhang merged commit b197bfe into PaddlePaddle:develop Dec 13, 2021
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.

5 participants