问题类型
Bug
你是否在TF nightly版本中复现了这个bug?
否
来源
source
Tensorflow版本
2.13.0
自定义代码
是
OS平台和发行版
Ubuntu 22.04
移动设备
- 无响应*
Python版本
3.9
Bazel版本
- 无响应*
GCC/编译器版本
- 无响应*
CUDA/cuDNN版本
- 无响应*
GPU型号和内存
- 无响应*
当前行为?
Segfault
独立代码以重现问题
import tensorflow as tf
import os
import numpy as np
from tensorflow.python.ops import bincount_ops
try:
arg_0_tensor = tf.random.uniform([3, 1], minval=-256, maxval=257, dtype=tf.int32)
arg_0 = tf.identity(arg_0_tensor)
weights = None
minlength = 2
maxlength = 0
dtype = "float32"
axis = -1
binary_output = True
out = bincount_ops.bincount(
arg_0,
weights=weights,
minlength=minlength,
maxlength=maxlength,
dtype=dtype,
axis=axis,
binary_output=binary_output,
)
except Exception as e:
print("Error:" + str(e))
import tensorflow as tf
import os
import numpy as np
from tensorflow.python.ops import bincount_ops
try:
arg_0_tensor = tf.random.uniform([3, 1], minval=-256, maxval=257, dtype=tf.int32)
arg_0 = tf.identity(arg_0_tensor)
weights = None
minlength = 4
maxlength = 0
dtype = "float32"
axis = -1
binary_output = True
out = bincount_ops.bincount(arg_0,weights=weights,minlength=minlength,maxlength=maxlength,dtype=dtype,axis=axis,binary_output=binary_output,)
except Exception as e:
print("Error:"+str(e))
相关日志输出
Error:maxlength: Tensor conversion requested dtype int32 for Tensor with dtype float32: <tf.Tensor: shape=(), dtype=float32, numpy=0.5696368>
Error:arr: Tensor conversion requested dtype int32 for Tensor with dtype int64: <tf.Tensor: shape=(10000,), dtype=int64, numpy=array([-123, 137, 225, ..., -163, -81, 75])>
Error:Unsupported value for argument axis=-3. Only 0 and -1 are currently supported.
Error:Attempt to convert a value (None) with an unsupported type (<class 'NoneType'>) to a Tensor.
Error:Attempt to convert a value (None) with an unsupported type (<class 'NoneType'>) to a Tensor.
Error:{{function_node __wrapped__Bincount_device_/job:localhost/replica:0/task:0/device:CPU:0}} Input arr must be non-negative! [Op:Bincount]
Error:Attempt to convert a value (None) with an unsupported type (<class 'NoneType'>) to a Tensor.
Error:arr: Tensor conversion requested dtype int32 for Tensor with dtype int8: <tf.Tensor: shape=(10000,), dtype=int8, numpy=array([105, -62, 101, ..., 105, -43, -41], dtype=int8)>
Error:arr: Tensor conversion requested dtype int32 for Tensor with dtype int64: <tf.Tensor: shape=(10000,), dtype=int64, numpy=array([-159, -131, 160, ..., 169, 71, -14])>
Error:Attempt to convert a value (None) with an unsupported type (<class 'NoneType'>) to a Tensor.
Error:arr: Tensor conversion requested dtype int32 for Tensor with dtype bool: <tf.Tensor: shape=(), dtype=bool, numpy=False>
Error:arr: Tensor conversion requested dtype int32 for Tensor with dtype int64: <tf.Tensor: shape=(10000,), dtype=int64, numpy=array([ 162, 215, -202, ..., -21, -92, 236])>
Error:Attempt to convert a value (None) with an unsupported type (<class 'NoneType'>) to a Tensor.
Error:Attempt to convert a value (None) with an unsupported type (<class 'NoneType'>) to a Tensor.
Error:{{function_node __wrapped__Bincount_device_/job:localhost/replica:0/task:0/device:CPU:0}} Input arr must be non-negative! [Op:Bincount]
Error:{{function_node __wrapped__Bincount_device_/job:localhost/replica:0/task:0/device:CPU:0}} Input arr must be non-negative! [Op:Bincount]
Error:{{function_node __wrapped__Bincount_device_/job:localhost/replica:0/task:0/device:CPU:0}} Input arr must be non-negative! [Op:Bincount]
Error:Value for attr 'T' of uint32 is not in the list of allowed values: int32, int64, float, double
; NodeDef: {{node Bincount}}; Op<name=Bincount; signature=arr:int32, size:int32, weights:T -> bins:T; attr=T:type,allowed=[DT_INT32, DT_INT64, DT_FLOAT, DT_DOUBLE]> [Op:Bincount]
Error:Attempt to convert a value (None) with an unsupported type (<class 'NoneType'>) to a Tensor.
Error:arr: Tensor conversion requested dtype int32 for Tensor with dtype int64: <tf.Tensor: shape=(10000,), dtype=int64, numpy=array([-98, 135, 191, ..., 129, 218, 106])>
Error:Attempt to convert a value (None) with an unsupported type (<class 'NoneType'>) to a Tensor.
Error:Attempt to convert a value (None) with an unsupported type (<class 'NoneType'>) to a Tensor.
Error:arr: Tensor conversion requested dtype int32 for Tensor with dtype int64: <tf.Tensor: shape=(1000,), dtype=int64, numpy=
array([ -60, 157, 215, 79, 195, 18, -112, -82, -116, 31, 220,
218, 175, -7, -152, -37, -190, -253, 58, 63, 128, 117,
-189, -4, -97, 9, 237, -33, -235, -211, 2, -244, 104,
5, -158, 144, 165, -19, -42, 234, -65, -207, -15, 81,
206, 135, -119, 97, 173, 254, 254, 122, -175, 229, -256,
61, 204, -32, -213, -238, -23, -221, -60, -229, 243, -9,
50, -243, -34, 103, -233, 183, 171, 228, -122, 234, 94,
161, -255, 184, -84, 215, -62, 69, 202, 64, -159, -256,
-133, 127, -133, 135, -105, 129, 114, 49, -217, -209, 133,
252, 25, 66, 24, 208, -222, -206, -84, 58, 55, -130,
42, -23, 94, 68, 119, -53, -191, -146, 129, 98, -74,
172, 143, -93, 121, 175, 196, -245, -79, 26, 46, 132,
-37, 141, 118, -160, -74, 108, -62, -241, 130, -173, 241,
71, 242, 34, 237, -4, -230, -122, -221, -185, 246, 39,
-58, 42, 2, -252, 108, -246, -135, 211, 66, 18, 196,
-146, 172, -87, 119, -91, -137, -120, 146, -139, 116, -25,
-244, 19, 52, -241, 229, 177, -187, -89, -189, 41, -175,
31, 183, 191, 64, 113, 68, 114, -186, -73, -115, -38,
-248, -228, 51, -1, 60, 150, 124, 169, -21, 202, -71,
112, 192, 182, 34, -95, 152, 58, 179, 23, 133, 38,
218, -154, 39, -70, -57, -230, -164, 14, 199, -182, 101,
-241, -91, -133, -13, 240, 76, 142, -16, 3, 22, 249,
-197, -101, -1, 155, -184, 178, -146, 92, -70, -154, -145,
-112, -135, -233, -95, -7, -204, -99, 149, -201, -94, -15,
89, 31, 127, -14, -145, -191, -11, 23, -73, 238, -11,
-93, 199, 145, 119, 18, 114, 240, 118, -101, -6, 63,
-52, -50, 69, -77, -16, -91, -245, -98, -72, -27, 46,
241, 11, 239, 212, 252, -124, -213, -19, 104, -203, 70,
147, 94, -28, 99, -129, 20, -66, 175, -88, 244, 35,
117, -136, -14, 38, -216, 15, 69, -50, -206, -95, -203,
9, -15, -40, 183, 176, 210, 100, 73, -13, -76, -52,
-249, -131, 255, 118, 175, -166, -211, 20, 211, 148, 164,
249, 252, -67, 164, -240, -174, 184, -64, -223, 35, 41,
-151, 57, -140, 86, 93, -206, -188, -126, 117, -50, -246,
-18, -251, -145, 79, -193, -120, -50, -32, 118, -215, -55,
-9, 62, 190, -61, -3, 231, 133, -226, 11, -205, -155,
-115, 125, 239, -186, 50, 179, 217, 48, 214, 171, 246,
-243, 201, 50, 180, -35, 52, 1, -215, 183, -247, -138,
160, 249, 101, 150, -99, 43, -210, -180, -44, -12, 59,
124, 27, -247, 27, -19, -12, -172, -165, 190, 231, 52,
206, 170, 236, -132, -54, 163, -188, 235, -64, 101, 227,
-188, 54, -119, 251, -199, 249, 26, -237, -170, 29, 87,
183, -139, -160, -119, 130, 195, -148, -85, 217, 53, -186,
243, -239, 132, 242, -56, 118, 102, -173, 209, -79, -80,
224, -92, 143, 127, -117, 72, -81, -159, 110, -45, 5,
-97, 154, 123, -36, -144, 198, -119, -187, 37, 178, 16,
197, 240, 31, 26, -85, 60, -226, -145, -31, 221, -181,
193, -10, -112, -197, -203, 166, -111, -93, -189, -131, -226,
155, -124, -136, 92, 97, 124, 52, 209, 21, -81, 12,
-71, -221, 54, -183, 96, 87, -202, 135, -83, 233, 56,
256, -27, -69, -42, 242, -151, -61, 209, 194, -137, -211,
197, 33, 24, 95, 1, 49, -168, 220, -188, 205, 206,
214, 59, -55, 131, -182, 108, 211, 15, -4, 82, -86,
-135, 67, -44, 141, -52, -205, 90, -32, -128, -112, 213,
-181, -134, 13, 195, 248, -81, 59, -148, -83, 132, -7,
158, 20, 202, 154, -147, -155, 8, -65, 59, 229, -16,
-221, -227, -130, -104, -15, -194, 53, 80, 33, 128, 165,
153, -151, -83, -188, 72, -104, 15, -62, -31, 213, -4,
156, -170, 12, -70, 131, 154, -126, -230, 16, 195, -178,
-252, 0, 20, -19, 192, -181, 85, 168, 195, -164, 156,
-176, -81, -126, -123, 96, 30, 79, 247, -27, 54, 120,
100, 126, 108, -117, 122, 78, -108, 226, 77, 10, 53,
-208, -35, -239, -149, -84, 14, 98, -179, 75, 172, -43,
-209, -36, 239, -118, -232, -200, -230, -167, -9, -224, 195,
-48, 224, 152, -20, -8, 112, -89, 159, 47, -27, -212,
51, 169, 121, 192, -236, -254, -252, -240, 95, 217, -17,
-88, 70, 191, 59, -185, 234, 71, 83, -61, -147, 176,
-61, 28, 44, -225, 8, -186, 77, 103, -186, -243, 72,
54, 0, 210, 88, 52, -182, 247, -181, 31, 164, 25,
-144, 54, -57, 203, 15, 42, 207, -89, 12, -109, 28,
-242, 110, 170, -25, 182, 20, 73, -135, -104, 221, -146,
-199, -186, -231, -28, -68, 9, 158, 57, 78, -116, -167,
-1, 117, -250, -118, 19, 171, 15, -73, -102, 137, 178,
166, 255, -59, 208, -77, -217, 239, -67, 84, -167, 194,
161, 222, -97, -193, 248, -145, 25, -139, -35, 226, 21,
91, -98, 189, -96, -14, -214, 218, 236, -32, -156, 49,
-108, 81, -7, -160, 74, 17, -221, -160, 130, 39, 97,
-108, 55, -23, -104, 191, -216, -175, 134, 109, 43, -102,
-166, 73, -142, 240, 78, -112, 145, 67, 74, -207, 180,
100, 163, -148, -202, -122, 55, 70, -142, -197, -87, -254,
-62, -129, -65, -106, -204, 140, 30, 160, -13, -167, -103,
250, -57, -123, 169, -64, -183, 19, -76, -207, -153, -128,
111, -85, -58, -148, -104, 91, 183, 212, 126, 122, 60,
-207, -62, -201, 175, 221, 195, -189, -31, -193, -216, 165,
36, 240, -202, 156, -237, -94, -138, -82, -130, -73, -145,
24, 21, 237, 57, -213, -31, 187, 99, -173, -139, 181,
-171, -62, 171, 178, -245, -75, -235, 20, -7, -15, 91,
199, -37, -245, -237, 164, -181, -42, 119, -1, 114, -200,
209, -42, 12, 113, -31, 31, -162, 191, 83, 217, 70,
-2, -155, 57, 11, 232, -89, 163, -243, -113, 194, 95,
-156, 251, -76, -154, -225, -126, 234, 148, -96, -105])>
Error:Attempt to convert a value (None) with an unsupported type (<class 'NoneType'>) to a Tensor.
Error:Attempt to convert a value (None) with an unsupported type (<class 'NoneType'>) to a Tensor.
Segmentation fault
</details>
4条答案
按热度按时间v1l68za41#
@nimashiri 一旦合并PR,这个问题就会被关闭。
谢谢!
35g0bw712#
@learning-to-play
pdtvr36n3#
在2.13.0版本上存在段错误。
vddsk6oq4#
@dmc1778 跟进问题负责人是一个好主意,他们可以帮助将问题分配给正确的人。
@sachinprasadhs 你可以和TF Ops团队一起寻找正确的人吗?