tf.sparse.transpose fails on SparseTensorValue and non-SparseTensor inputs
Los mantenedores suelen responder en 2 días
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Issue type
Bug
Have you reproduced the bug with TensorFlow Nightly?
Yes
Source
binary
TensorFlow version
2.21.0 / nightly
Custom code
Yes
OS platform and distribution
Windows / Linux
Python version
3.10
Current behavior?
tf.sparse.transpose raises AttributeError: 'SparseTensorValue' object has no attribute 'shape' when given a SparseTensorValue, and AttributeError: 'list' object has no attribute 'shape' when given non-SparseTensor inputs (such as a Python list).
Expected behavior:
tf.sparse.transpose should accept SparseTensorValue instances (converting them to SparseTensor as done in tf.sparse.reshape, tf.sparse.reorder, tf.sparse.slice, and tf.sparse.concat), and raise TypeError: Input must be a SparseTensor. when passed non-SparseTensor inputs, consistent with its documented Raises: TypeError: If sp_input is not a SparseTensor. contract.
Standalone code to reproduce the issue
import numpy as np
import tensorflow as tf
# 1. SparseTensorValue fails with AttributeError
sp_val = tf.compat.v1.SparseTensorValue(
indices=np.array([[0, 1], [2, 3]]),
values=np.array([1.0, 2.0]),
dense_shape=np.array([4, 5]),
)
tf.sparse.transpose(sp_val)
# AttributeError: 'SparseTensorValue' object has no attribute 'shape'
# 2. Non-SparseTensor fails with AttributeError instead of documented TypeError
tf.sparse.transpose([[1, 2], [3, 4]])
# AttributeError: 'list' object has no attribute 'shape'
- Lenguaje dominante
- C++
- Estrellas
- 201k
- Forks
- 78.4k
- Merge medio
- 3 d 1 h
- PR fusionados (30 d)
- 433
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de tensorflow/tensorflow
-
LinearOperatorCirculant adjoint(), matmul(operator) and solve(operator) return complex64 operators regardless of input_output_dtypePosiblemente ocupada @Venkat6871 la tomó hace 1 día. Abiertotype:bug
tensorflow/tensorflow#130098 · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
tf.linalg.LinearOperatorCirculant.solve fails when spectrum precision differs from input_output_dtypePosiblemente ocupada @Venkat6871 la tomó hace 1 día. Abiertotype:bug
tensorflow/tensorflow#130096 · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
[RFC] Add codespell spelling presubmit for changed Python/Markdown filesPosiblemente ocupada @Venkat6871 la tomó hace 1 día. Abierto
tensorflow/tensorflow#130085 · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
tf.math.polyval fails for Python int coefficients with a float xPosiblemente ocupada @Venkat6871 la tomó hace 3 días. Abierto2.20.0 awaiting PR merge comp:ops type:bug
tensorflow/tensorflow#130023 · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
tf.Tensor.__dlpack__ rejects a matching dl_device instead of using the zero-copy pathPosiblemente ocupada @Kayyuri la tomó hace 3 días. Abiertoawaiting PR merge comp:core type:bug
tensorflow/tensorflow#129993 · 3 comentarios · 1 asignado ·
Los mantenedores suelen responder en 2 días
Todos los issues de tensorflow/tensorflow
Issues similares
-
Upstream changes to reviewAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
rhalbersma/xstd-ints#395 ·
Los mantenedores suelen responder en 1 día
-
[Bug] Root filesystem scope (/) incorrectly rejects all descendant pathsPosiblemente ocupada @mugenkyou la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
neutralinojs/neutralino.js#304 · 1 comentario ·
-
zq prints a raw SQL 'no such table: index_default' error when the index has no default indexAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
mattgodbolt/zindex#67 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
NKI-AI/fastslide#105 · 2 comentarios ·
Los mantenedores suelen responder en 3 días