Sign in
apache
/
mxnet-test
/
refs/tags/v0.10.11
/
.
/
R-package
/
demo
/
basic_bench.R
blob: 4c4a5d5798aa228d222c4897ce1a303c3706eb77 [
file
] [
log
] [
blame
]
require
(
mxnet
)
require
(
methods
)
shape
=
c
(
1
,
1
)
lr
=
0.01
x
=
mx.nd.ones
(
shape
)
y
=
mx.nd.zeros
(
shape
)
print
(
x
)
n
=
1000
tic
=
proc.time
()
for
(
i
in
1
:
n
)
{
y
=
y
+
x
*
lr
}
toc
=
proc.time
()
-
tic
as.array
(
y
)
print
(
toc
)