Skip to content

Commit 9325475

Browse files
authored
Fix types in set_attr_shape_list
The lack of `Cint` for the second to last argument is particularly problematic, because TensorFlow would get incorrect values for the lengths of the shape array.
1 parent 699adf4 commit 9325475

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/core.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1355,15 +1355,15 @@ function set_attr_list(desc::NodeDescription, attr_name, list::Vector{<:DataType
13551355
end
13561356

13571357
function set_attr_shape_list(desc::NodeDescription, attr_name, list::Vector)
1358-
dims = Vector{Int}[]
1358+
dims = Vector{Int64}[]
13591359
for shape in list
1360-
push!(dims, [shape...])
1360+
push!(dims, Int64[shape...])
13611361
end
13621362
@tfcall(:TF_SetAttrShapeList, Cvoid, (Ptr{Cvoid}, Cstring, Ptr{Ptr{Int64}}, Ptr{Cint}, Cint),
13631363
desc.ptr,
13641364
attr_name,
13651365
dims,
1366-
[length(x) for x in dims],
1366+
Cint[length(x) for x in dims],
13671367
length(dims))
13681368
end
13691369

0 commit comments

Comments
 (0)