2016-12-14 124 views
0

在下面的链接中运行教程时,当我进入下面的步骤时,出现以下错误。在这之前没有错误。在R中使用mxnet预训练的图像分类模型

http://mxnet.io/tutorials/r/classifyRealImageWithPretrainedModel.html

prob <- predict(model, X=normed) [19:01:35] D:\chhong\mxnet\dmlc-core\include\dmlc/logging.h:235: [19:01:35] d:\chhong\mxnet\src\operator./concat-inl.h:152: Check failed: (dshape[j]) == (tmp[j]) Incorrect shape[2]: (1,320,15,15). (first input shape: (1,576,14,14)) Error: InferShape Error in ch_concat_3c_chconcat: [19:01:35] d:\chhong\mxnet\src\operator./concat-inl.h:152: Check failed: (dshape[j]) == (tmp[j]) Incorrect shape[2]: (1,320,15,15). (first input shape: (1,576,14,14))

+0

要问一个故障诊断问题,您需要提供代码和数据以在问题本身内重现您的问题 –

+0

我是mxnet R软件包的维护人员。首先,我建议你在github上打开问题。其次,问题的原因是Windows包太旧了。它尚未更新一段时间,因为我现在无法访问任何Windows机器。 –

回答

0

不知道如果教程得到固定或部件之一得到了固定,但本教程在Mac

+0

正如[Qiang的评论](https://stackoverflow.com/questions/41132794/using-mxnet-pre-trained-image-classification-model-in-r/49060756#comment69513882_41132794)中所述,该问题出现在WINDOWS机器上。 – Mogsdad

1

今天测试的时候,我有我的Windows服务器上运行教程无误的执行R2 2012机器,其中mxnet版本为0.10.1,R版本为3.4.3。

它运行没事了,出了问题的唯一的事情是,在一次我在第一次运行它require(mxnet)包退换我:

> require(mxnet) 
Loading required package: mxnet 
Error: package or namespace load failed for ‘mxnet’: 
object ‘set_global_graph_attrs’ is not exported by 'namespace:DiagrammeR' 

我必须安装并加载制图手动确保开始。这里是代码这样做:

# Make sure you have devtools installed already 
require(devtools) 
install_version("DiagrammeR", version = "0.9.0", repos = "http://cran.us.r-project.org") 
require(DiagrammeR) 

之后,我再次运行教程,它工作正常。

相关问题