From 932547509a9af0f73d7a1831078da0df7bc39d09 Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Sun, 4 Nov 2018 15:19:41 -0500 Subject: [PATCH] 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. --- src/core.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core.jl b/src/core.jl index e08cc8d6..9ddafed2 100644 --- a/src/core.jl +++ b/src/core.jl @@ -1355,15 +1355,15 @@ function set_attr_list(desc::NodeDescription, attr_name, list::Vector{<:DataType end function set_attr_shape_list(desc::NodeDescription, attr_name, list::Vector) - dims = Vector{Int}[] + dims = Vector{Int64}[] for shape in list - push!(dims, [shape...]) + push!(dims, Int64[shape...]) end @tfcall(:TF_SetAttrShapeList, Cvoid, (Ptr{Cvoid}, Cstring, Ptr{Ptr{Int64}}, Ptr{Cint}, Cint), desc.ptr, attr_name, dims, - [length(x) for x in dims], + Cint[length(x) for x in dims], length(dims)) end