Tensorflow Argmax : What's the difference between "axis" and "dimension" parameter?

标签 tensorflow neural-network argmax

当前版本的 Tensorflow Argmax 没有指定“轴”和“维度”参数之间的区别。这是official manual 中给出的唯一信息:

tf.argmax(input, axis=None, name=None, dimension=None) {#argmax}

Returns the index with the largest value across axes of a tensor.

Args:

input: A Tensor. Must be one of the following types: float32, float64, int64, int32, uint8, uint16, int16, int8, complex64, complex128, qint8, quint8, qint32, half.

axis: A Tensor. Must be one of the following types: int32, int64. int32, 0 <= axis < rank(input). Describes which axis of the input Tensor to reduce across. For vectors, use axis = 0.

name: A name for the operation (optional).

Returns:

A Tensor of type int64.

有人可以澄清吗?哪一个实际上是降维的?

最佳答案

TensorFlow 正在过渡到使用 axis而不是 dimension即将弃用:https://www.tensorflow.org/install/migration

关于Tensorflow Argmax : What's the difference between "axis" and "dimension" parameter?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42397591/

相关文章:

python - 不推荐使用与输入大小 (torch.Size([16, 2])) 不同的目标大小 (torch.Size([16]))

python - 获取轴上 numpy.argmax 元素的索引

python - 无法在 Google Colab 中加载 OpenAI Gym 环境

python - 如果 LSTM 单元由同一个函数创建,它们会共享权重吗?

tensorflow - 每次调用模型的新实例时,神经网络模型中的层数都会不断增加

python - tensorflow 错误 : Invalid argument: shape must be a vector

python - 了解 Keras EarlyStopping 的行为

python - 返回元组的 np.argmax

python - 如何使用 argmax 将索引返回到无法重新整形为矩阵的多维 ndarray 中?

python - 如何在 tensorflow 中处理不同的队列批量大小和馈送值批量大小?