python - Tensorflow 中的可微分操作列表

标签 python tensorflow

是否有可微分(即自动微分)的 Tensorflow 操作的主列表?

另外两种表达方式:

  • 未设置 ops.NoGradient 的操作列表。
  • 不会触发 LookupError 的操作列表。

例如,我假设所有控制流操作都是不可微分的(例如,tf.where)。除了通过 tf.gradients 手动运行它们以查看它们是否抛出 LookupError 之外,我该如何找到它。

“常识”不是有效答案。

谢谢。

编辑:

tf.where 是可微分的,所以我的直觉是错误的。也许这里正确的问题是 Tensorflow 中的哪些操作不可可微分。

谢谢。

最佳答案

我已经使用 Python 代码设计了可微分和不可微分 Ops 的完整列表。

您可以在此处找到紧凑列表。还有生成它的代码。

https://github.com/Mainak431/List-of-Differentiable--OPs-and-Non-differentiable-OPs--in-Tensorflow

关于python - Tensorflow 中的可微分操作列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44572161/

相关文章:

python - 为什么比较两个分别包含一个 NumPy 对象的元组会报错?

python - python 中函数可以返回 numpy 参数吗?

tensorflow - Keras image_dataset_from_directory 未找到图像

python - 在tensorflow GitHub中找不到 "gen_training_ops"

python - sympy 匹配在取模方面有困难

python - 从两个曲面的交点求方程 y = y(x) z = z(x,y)

python - 如何重命名 Tensorflow 中操作的输入张量名称?

python - 没有 tf.keras.backend 的 lambda 层函数定义(Python Keras 包)

python - 在 Windows 上升级 TensorFlow

python - 如何创建除一组给定值之外的随机序列