zh-NER-TF icon indicating copy to clipboard operation
zh-NER-TF copied to clipboard

UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory. "Converting sparse IndexedSlices to a dense Tensor of unknown shape. "

Open bobobe opened this issue 6 years ago • 1 comments

训练时一直有这个warning,我定位了一下是``grads_and_vars = optim.compute_gradients(self.loss)这句的问题。我训练时并没有占用多大内存,却一直提示我GPU内存不够,我怀疑是这个警告的问题。该如何解决?

bobobe avatar Jun 19 '18 04:06 bobobe

Hi, 这个warning我这里也有,但不影响训练。这个代码只需要大概700M的显存。我在程序开头限制了显存占用不能超过显卡满显存的20%,不知道是否在你那里导致了显存不足

Determined22 avatar Jul 02 '18 11:07 Determined22