Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with multiple inputs simultaneously #160

Open
marcobonici opened this issue Mar 7, 2024 · 0 comments
Open

Problem with multiple inputs simultaneously #160

marcobonici opened this issue Mar 7, 2024 · 0 comments

Comments

@marcobonici
Copy link

marcobonici commented Mar 7, 2024

Up to 1.10, if I were instantiating a mlpd like the following

mlpd = SimpleChain(
  static(6),
  TurboDense(tanh, 64),
  TurboDense(tanh, 64),
  TurboDense(relu, 64),
  TurboDense(tanh, 64),
  TurboDense(tanh, 64),
  TurboDense(identity, 40)
)

weights = SimpleChains.init_params(mlpd)

and then feeding it some data

mlpd(rand(6), weights)

But, if I try with

mlpd(rand(6, 6), weights)

I get the following error message

ERROR: conversion to pointer not defined for Vector{UInt8}
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] unsafe_convert(::Type{Ptr{UInt8}}, a::Vector{UInt8})
   @ Base ./pointer.jl:67
 [3] with_heap_memory(::typeof(SimpleChains._chain), ::SimpleChain{Tuple{…}, Tuple{…}}, ::Int64, ::StrideArraysCore.PtrArray{Float64, 2, (1, 2), Tuple{…}, Tuple{…}, Tuple{…}}, ::Ptr{Float32})
   @ SimpleChains ~/.julia/packages/SimpleChains/u5b1E/src/memory.jl:38
 [4] (::SimpleChain{Tuple{…}, Tuple{…}})(arg::Matrix{Float64}, params::StrideArraysCore.StaticStrideArray{Float32, 1, (1,), Tuple{…}, Tuple{…}, Tuple{…}, 19688})
   @ SimpleChains ~/.julia/packages/SimpleChains/u5b1E/src/simple_chain.jl:193
 [5] top-level scope
   @ REPL[9]:1
Some type information was truncated. Use `show(err)` to see complete types.

So, given that the 1.11 alpha just came out maybe this is not so worrisome, but I wanted to let you know as soon as I noticed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant