Skip to content

Erratic Dilation behavior #44

@staticfloat

Description

@staticfloat

Uh-oh, I should have tested this more thoroughly looks like. :/

# 2-length convolution with 1 channel in and 1 channel out
w = reshape(Float64[1, 1], (2, 1, 1))

# 128-length input vector with 1 channel and 1 batch.
x = reshape(Float64[1:128...], (128, 1, 1))

# Let's calculate the same thing a couple different times
ys = []
for idx in 1:10
    push!(ys, NNlib.conv(x, w; dilation = 2))
end

# Do some of these randomly have a bunch of NaN's in them?  Why yes they do:
[any(isnan.(ys[idx])) for idx in 1:10]

Running the above results in:

10-element Array{Bool,1}:
 false
  true
  true
 false
 false
 false
 false
 false
  true
  true

The fact that this is erratic makes me think the BLAS routine is reading from uninitialized/clobbered memory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions