mxnet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] kevinthesun opened a new issue #9835: Failed to export gluon model zoo vision model to symbol file
Date Thu, 01 Jan 1970 00:00:00 GMT
kevinthesun opened a new issue #9835: Failed to export gluon model zoo vision model to symbol
file
URL: https://github.com/apache/incubator-mxnet/issues/9835
 
 
   ## Description
   Gluon block export function returned error while trying to export mobilenet, alexnet, densenet,
squeezenet and resnet_v2 models. MXNet is built from source with mkldnn.
   
   MXNet commit hash:
   af0c3b4e9bcb41734375470f965bba3c5731b1d0
   
   ## Error Message:
   ```
   Traceback (most recent call last):
     File "test.py", line 18, in <module>
       block.export(model)
     File "/home/ubuntu/mxnet/python/mxnet/gluon/block.py", line 558, in export
       ndarray.save('%s-%04d.params'%(path, epoch), arg_dict)
     File "/home/ubuntu/mxnet/python/mxnet/ndarray/utils.py", line 236, in save
       keys))
     File "/home/ubuntu/mxnet/python/mxnet/base.py", line 148, in check_call
       raise MXNetError(py_str(_LIB.MXGetLastError()))
   mxnet.base.MXNetError: [06:26:59] src/operator/tensor/./././elemwise_unary_op.h:301: Check
failed: inputs[0].dptr_ == outputs[0].dptr_ (0x7fbc19d37000 vs. 0x7fbc19d39000) 
   
   Stack trace returned 10 entries:
   [bt] (0) /home/ubuntu/mxnet/python/mxnet/../../lib/libmxnet.so(dmlc::StackTrace[abi:cxx11]()+0x5b)
[0x7fbcedf144fb]
   [bt] (1) /home/ubuntu/mxnet/python/mxnet/../../lib/libmxnet.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x28)
[0x7fbcedf15518]
   [bt] (2) /home/ubuntu/mxnet/python/mxnet/../../lib/libmxnet.so(void mxnet::op::UnaryOp::IdentityCompute<mshadow::cpu>(nnvm::NodeAttrs
const&, mxnet::OpContext const&, std::vector<mxnet::TBlob, std::allocator<mxnet::TBlob>
> const&, std::vector<mxnet::OpReqType, std::allocator<mxnet::OpReqType> >
const&, std::vector<mxnet::TBlob, std::allocator<mxnet::TBlob> > const&)+0xa99)
[0x7fbcee3b8c19]
   [bt] (3) /home/ubuntu/mxnet/python/mxnet/../../lib/libmxnet.so(mxnet::imperative::PushFCompute(std::function<void
(nnvm::NodeAttrs const&, mxnet::OpContext const&, std::vector<mxnet::TBlob, std::allocator<mxnet::TBlob>
> const&, std::vector<mxnet::OpReqType, std::allocator<mxnet::OpReqType> >
const&, std::vector<mxnet::TBlob, std::allocator<mxnet::TBlob> > const&)>
const&, nnvm::Op const*, nnvm::NodeAttrs const&, mxnet::Context const&, std::vector<mxnet::engine::Var*,
std::allocator<mxnet::engine::Var*> > const&, std::vector<mxnet::engine::Var*,
std::allocator<mxnet::engine::Var*> > const&, std::vector<mxnet::Resource,
std::allocator<mxnet::Resource> > const&, std::vector<mxnet::NDArray*, std::allocator<mxnet::NDArray*>
> const&, std::vector<mxnet::NDArray*, std::allocator<mxnet::NDArray*> >
const&, std::vector<unsigned int, std::allocator<unsigned int> > const&,
std::vector<mxnet::OpReqType, std::allocator<mxnet::OpReqType> > const&)::{lambda(mxnet::RunContext)#1}::operator()(mxnet::RunContext)
const+0x1067) [0x7fbcf06f7ec7]
   [bt] (4) /home/ubuntu/mxnet/python/mxnet/../../lib/libmxnet.so(std::_Function_handler<void
(mxnet::RunContext), mxnet::engine::ThreadedEngine::BulkAppend(std::function<void (mxnet::RunContext)>,
mxnet::Context, std::vector<mxnet::engine::Var*, std::allocator<mxnet::engine::Var*>
> const&, std::vector<mxnet::engine::Var*, std::allocator<mxnet::engine::Var*>
> const&)::{lambda(mxnet::RunContext)#1}>::_M_invoke(std::_Any_data const&,
mxnet::RunContext&&)+0x68) [0x7fbcf0b6ba98]
   [bt] (5) /home/ubuntu/mxnet/python/mxnet/../../lib/libmxnet.so(std::_Function_handler<void
(mxnet::RunContext), mxnet::engine::ThreadedEngine::BulkAppend(std::function<void (mxnet::RunContext)>,
mxnet::Context, std::vector<mxnet::engine::Var*, std::allocator<mxnet::engine::Var*>
> const&, std::vector<mxnet::engine::Var*, std::allocator<mxnet::engine::Var*>
> const&)::{lambda(mxnet::RunContext)#1}>::_M_invoke(std::_Any_data const&,
mxnet::RunContext&&)+0x47) [0x7fbcf0b6ba77]
   [bt] (6) /home/ubuntu/mxnet/python/mxnet/../../lib/libmxnet.so(std::_Function_handler<void
(mxnet::RunContext, mxnet::engine::CallbackOnComplete), mxnet::engine::ThreadedEngine::BulkFlush()::{lambda(mxnet::RunContext,
mxnet::engine::CallbackOnComplete)#1}>::_M_invoke(std::_Any_data const&, mxnet::RunContext&&,
mxnet::engine::CallbackOnComplete&&)+0x4b) [0x7fbcf0b5794b]
   [bt] (7) /home/ubuntu/mxnet/python/mxnet/../../lib/libmxnet.so(mxnet::engine::ThreadedEngine::ExecuteOprBlock(mxnet::RunContext,
mxnet::engine::OprBlock*)+0x2be) [0x7fbcf0b5c2ee]
   [bt] (8) /home/ubuntu/mxnet/python/mxnet/../../lib/libmxnet.so(std::_Function_handler<void
(std::shared_ptr<mxnet::engine::ThreadPool::SimpleEvent>), mxnet::engine::ThreadedEnginePerDevice::PushToExecute(mxnet::engine::OprBlock*,
bool)::{lambda()#1}::operator()() const::{lambda(std::shared_ptr<mxnet::engine::ThreadPool::SimpleEvent>)#1}>::_M_invoke(std::_Any_data
const&, std::shared_ptr<mxnet::engine::ThreadPool::SimpleEvent>&&)+0x133)
[0x7fbcf0b79d73]
   [bt] (9) /home/ubuntu/mxnet/python/mxnet/../../lib/libmxnet.so(std::thread::_Impl<std::_Bind_simple<std::function<void
(std::shared_ptr<mxnet::engine::ThreadPool::SimpleEvent>)> (std::shared_ptr<mxnet::engine::ThreadPool::SimpleEvent>)>
>::_M_run()+0x4a) [0x7fbcf0b7590a]
   ```
   
   ## Minimum reproducible example
   ```python
   import numpy as np
   import mxnet as mx
   
   from mxnet.gluon.model_zoo.vision import get_model
   
   model = "mobilenet1.0"
   batch_size = 1
   
   image_shape = (3, 224, 224)
   data_shape = (batch_size,) + image_shape
   
   data_array = np.random.uniform(0, 255, size=data_shape).astype("float32")
   mx_data = mx.nd.array(data_array)
   
   block = get_model(model, pretrained=True)
   block.hybridize()
   block(mx_data)
   block.export(model)
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message