在R中使用mxnet预训练的图像分类模型

时间:2016-12-14 00:19:53

标签: r mxnet

在下面的链接中运行教程,当我进入下面的步骤时,我收到以下错误。在此之前没有错误。

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

  

概率< - 预测(模型,X =标准)   [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:检查失败:(dshape [j])==(tmp [j])形状不正确[2] :( 1,320,15,15)。 (第一输入形状:(1,576,14,14))   错误:ch_concat_3c_chconcat中的InferShape错误:[19:01:35] d:\ chhong \ mxnet \ src \ operator \ /concat-inl.h:152:检查失败:(dshape [j])==(tmp [j] )形状不正确[2] :( 1,320,15,15)。 (第一个输入形状:(1,576,14,14))

2 个答案:

答案 0 :(得分:1)

我已经在我的Windows Server 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'

我必须手动安装和加载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)

之后我再次运行教程并且运行正常。

答案 1 :(得分:0)

不确定教程是否已修复或其中一个组件是否已修复,但今天在Mac上进行测试时,本教程无错误执行

相关问题