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

cudaMalloc retry failed #19866

Answered by seekFire
seekFire asked this question in Q&A
Discussion options

You must be logged in to vote

@leezu
I think I may find out the error reason: when I use the class mx.metric.CustomMetric to wrap my custom metric function, the type of input tensor (label & pred) of this function has converted from mxnet.ndarray.ndarray.NDArray to numpy.ndarray automatically, so it will generate this error. The validation process is as follows, same script as above except using numpy to replace mxnet.ndarray:

>>> import numpy as np
>>> x = np.ones((2, 3, 4, 5))
>>> y = x.transpose((0, 3, 1, 2)).reshape(0, -3, -1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: can only specify one unknown dimension

The error is same as the mentioned above. I think the class mx.me…

Replies: 9 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by szha
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #19499 on February 08, 2021 20:07.