wOOL / TNRDMTL

[Code] Trace Norm Regularised Deep Multi-Task Learning
The Unlicense
27 stars 12 forks source link

Running this code on GPU #3

Closed rana-alshaikh closed 7 years ago

rana-alshaikh commented 7 years ago

Hi did you try to run this code on GPU, because it gives an error in tf..svd

wOOL commented 7 years ago

@rana-alshaikh I didn't try it on GPU, but I might be able to help if you post which error exactly you saw.

rana-alshaikh commented 7 years ago

Thanks for your answer, I found that there is no GPU kernel registered for SVD I raise the issue hopefully in the future we can run it on GPU I have one more question the input to this code is the Matrix (as a tensor) that I want to calculate the nuclear norm for it, right?

wOOL commented 7 years ago

@rana-alshaikh Oh, I see. So the problem is that in fact TensorFlow does not have a GPU implementation of tf.svd.

Since this is not an issue of this implementation, I'd like to close it.

To answer your last question, there are two functions that you can use.

If you are pretty sure that you want a trace norm for a matrix (2D array), you can use "nuclear_norm".

Otherwise, if you need somewhat a "tensor" (>2D array) trace norm, e.g., in deep multi-task learning, it can be a 3D tensor for a certain fully-connected layer (see the IPython Notebook demo), then you can go for "TensorTraceNorm".