简体   繁体   English

什么是 tensorflow.python.ops

[英]What is tensorflow.python.ops

I have searched it in tensorflow website, but I can not find any information about it.我在 tensorflow 网站上搜索过它,但找不到任何有关它的信息。 Is it not a tensorflow API?不是tensorflow API吗? Where can I find it's function?我在哪里可以找到它的功能?

API is usually something reserved for end-users. API 通常是为最终用户保留的。 Like keras API, we frequently use keras to create models.和 keras API 一样,我们经常使用 keras 来创建模型。 The API stands for 'Application Programming Interface'. API 代表“应用程序编程接口”。 The Ops however, is not intended for end-users.然而,Ops 并非面向最终用户。 It is used by tensorflow API-s to function. tensorflow API-s 使用它来运行。 For example.例如。 If you use a tf.data.Dataset and you make a map operation on that dataset, the function that you pass into the map is converted to a highly optimized version of what you wrote in python.如果您使用tf.data.Dataset并对该数据集进行map操作,则您传递到map的函数将转换为您在 Python 中编写的高度优化版本。 For that, tf.python.ops might be used.为此,可能会使用tf.python.ops
From source源头

An Operation is a node in a tf.Graph that takes zero or more Tensor objects as input, and produces zero or more Tensor objects as output. Operation 是 tf.Graph 中的一个节点,它以零个或多个 Tensor 对象作为输入,并产生零个或多个 Tensor 对象作为输出。 Objects of type Operation are created by calling a Python op constructor (such as tf.matmul) within a tf.function or under a tf.Graph.as_default context manager. Operation 类型的对象是通过在 tf.function 内或在 tf.Graph.as_default 上下文管理器下调用 Python op 构造函数(例如 tf.matmul)来创建的。
For example, within a tf.function, c = tf.matmul(a, b) creates an Operation of type "MatMul" that takes tensors a and b as input, and produces c as output.例如,在 tf.function 中, c = tf.matmul(a, b) 创建了一个“MatMul”类型的操作,它以张量 a 和 b 作为输入,并产生 c 作为输出。

TL;DR: For starters, you don't need to know all the details about tf.python.ops . TL;DR:首先,您不需要了解有关tf.python.ops所有详细信息。 It's used in backend.它用于后端。

Did this answer help?这个答案有帮助吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 什么是 tensorflow.python.data.ops.dataset_ops._OptionsDataset? - What is tensorflow.python.data.ops.dataset_ops._OptionsDataset? 在 tensorflow.python.data.ops.dataset_ops.BatchDataset 的最后注明数据类型的 object 究竟是什么? - What exactly is the object whose datatype is noted in the very end of a tensorflow.python.data.ops.dataset_ops.BatchDataset? 没有名为“tensorflow.python.ops.numpy_ops”的模块 - No module named 'tensorflow.python.ops.numpy_ops' ModuleNotFoundError:没有名为“tensorflow.python.ops.numpy_ops”的模块 - ModuleNotFoundError: No module named 'tensorflow.python.ops.numpy_ops' Tensorflow变量和Ops与Python等效项 - Tensorflow Variables and Ops vs. Python Equivalents Tensorflow - ops 构造函数是什么意思? - Tensorflow - What does ops constructors mean? python 注册表 Tensorflow 中缺少图形操作 - Graph ops missing from the python registry Tensorflow 类型 'tensorflow.python.framework.ops.EagerTensor' 没有 len() - type 'tensorflow.python.framework.ops.EagerTensor' has no len() 'tensorflow.python.framework.ops.EagerTensor' 对象没有属性 'squeeze' - 'tensorflow.python.framework.ops.EagerTensor' object has no attribute 'squeeze' AttributeError: 模块“tensorflow.python.framework.ops”没有属性“RegisterShape” - AttributeError: module 'tensorflow.python.framework.ops' has no attribute 'RegisterShape'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM