TF.SQRT()调用后面会发生什么?

发布于 2025-02-12 01:49:35 字数 688 浏览 0 评论 0原文

我试图了解tf.sqrt()呼叫(我的意思是呼叫堆)背后会发生什么。我知道gen_math_ops.py是在TF汇编过程中生成的,其中具有SQRT函数。但是似乎SQRT在两个地方实现,

  1. https://github.com/tensorflow/tensorflow/blob/r2.9/tensorflow/core/core/math_ops.cc.cc
  2. https://github.com/tensorflow/tensorflow/tensorflow/tensorflow/blob/r.r.rblob/rblob/tensorflow/core/core/core/kernels/kernels/cwise_op_op_op_sqrt.cc.ccccc.ccc.ccc <一下/a>

任何人都可以让我知道它们是如何连接的,以及如何在幕后执行SQRT?

谢谢你!

I am trying to understand what happens behind tf.sqrt() call (I mean the call-stack). I got to know that gen_math_ops.py is generated during TF compilation which has a sqrt function in it. But it seems that sqrt in implemented in two places,

  1. https://github.com/tensorflow/tensorflow/blob/r2.9/tensorflow/core/ops/math_ops.cc
  2. https://github.com/tensorflow/tensorflow/blob/r2.9/tensorflow/core/kernels/cwise_op_sqrt.cc

Can anyone please let me know how these are connected and how sqrt is executed behind the scenes?

Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文