Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[R] Bug in mx.nd.one.hot or gan code in example #8306

Closed
lovivi opened this issue Oct 17, 2017 · 2 comments
Closed

[R] Bug in mx.nd.one.hot or gan code in example #8306

lovivi opened this issue Oct 17, 2017 · 2 comments
Labels

Comments

@lovivi
Copy link

lovivi commented Oct 17, 2017

I'm R woker.
i m testing the GAN net using the R code from the mxnet example, but it has something error.
incubator-mxnet/example/gan/CGAN_mnist_R/CGAN_train.R
when i test

digit<- mx.nd.array(rep(9, times=batch_size))
data<- mx.nd.one.hot(indices = digit, depth = 10)
#data<- mx.nd.reshape(data = data, shape = c(1,1,-1, batch_size))
it will back
Error in mx.nd.one.hot(indices = digit, depth = 10) :
./base.h:291: Unsupported parameter type object type for argument indices, expect integer, logical, or string.

i have tried to change digit as a numeric or array, the data will be a null list.
anyone else have tested this examble? plese help me......

@jeremiedb
Copy link
Contributor

What version of MXNet package and R are you using?
I didn't had issue with the following commands in both 0.10.1 (Windows) and 0.11.1 (Ubuntu) :

> library(mxnet)
> digit <- mx.nd.array(rep(1, times=5))
> data <- mx.nd.one.hot(indices = digit, depth = 3)
> data
     [,1] [,2] [,3] [,4] [,5]
[1,]    0    0    0    0    0
[2,]    1    1    1    1    1
[3,]    0    0    0    0    0
> class(digit)
[1] "MXNDArray"

@thirdwing thirdwing added the R label Oct 31, 2017
@anirudhacharya
Copy link
Member

anirudhacharya commented Apr 4, 2018

Error not reproducible. The above code works on the latest master.

@sandeep-krishnamurthy @cjolivier01 @thirdwing please close this issue.

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

No branches or pull requests

5 participants