gino244 opened a new pull request #17533: replace the default value of context in load_checkpoint to cpu() URL: https://github.com/apache/incubator-mxnet/pull/17533 ## Description ## When we call load_checkpoint(prefix, epoch, ::mx.FeedForward; context) without specifying context, the following error occurs: ``` TypeError: in keyword argument context, expected Union{Context, Array{Context,1}}, got Nothing Stacktrace: [1] (::Core.var"#kw#Type")(::NamedTuple{(:context,),Tuple{Nothing}}, ::Type{FeedForward}, ::SymbolicNode) at ./none:0 [2] #load_checkpoint#8955(::Nothing, ::typeof(MXNet.mx.load_checkpoint), ::String, ::Int64, ::Type{FeedForward}) at /home/gino244/bin/mxnet/julia/src/model.jl:652 [3] load_checkpoint(::String, ::Int64, ::Type{FeedForward}) at /home/gino244/bin/mxnet/julia/src/model.jl:651 [4] top-level scope at In[]:1 ``` This is because the default value of context argument in load_checkpoint is nothing. The FeedForward constructor doesn't accept Nothing Type as context argument. context argument in load_checkpoint(prefix, epoch, ::mx.FeedForward; context) should be Context type. I propose cpu().
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
