Open ltetrel opened 4 years ago
Great to know, but what benefits do we get out of this?
Great to know, but what benefits do we get out of this?
@aidv Believe this could TF2 models have various benefits. One we're looking at is since TF2 is the best route to tflite and mobile support. There surely are other reasons to go TF2.
Hi,
Just wanted to let you know that I upgraded spleeter with tensorflow 2 using
tf_upgrade_v2 --intree ./ --outtree ./ --reportfile report.txt
fromtf2
branch and it is working fine.
...
@ltetrel - Thanks, would like to try it out and see if the quality is good enough at least for now until we manage to re-train in full for TF2 (#477).
I see that tf2
branch is already merged back to master (60ef2778f228bb4a3b3a818c7ea7979a3934faca)
Questions:
With that upgrade command/process can I take the pretrained_models/2stem
and convert just that one to TF2?
What's the quality difference when you say: Of course the script just replace older function by tf.compat.v1 so it is not the most optimal option..
? Was it measured, or do you have a sense?
Hi @agur, I did that a while ago but I will try to be the more accurate as possible. I did not compare the quality/benchmark the speed gain between tf1 and tf2. For me it was mostly the only way to get spleeter to work since I have cuda 10 (nvidia rtx card).
tf.compat.v1
is just a fork of the old tf1
code). One of the major update is an improvement in the graph build and computation, you can still check here all the major differences: https://www.tensorflow.org/guide/effective_tf2@ltetrel - thanks, not sure that your method is relevant to those needing mobile and tflite. If it is relevant, or if there is another way to convert the existing pretrained_models/2stem
to TF2 format which is reasonably easy - that would be a good shorter term fix for those who want mobile. @VVasanth - plz lmk if you can add here.
@ltetrel - If I understand correctly, you have used the above command to migrate the code from TF1 to TF2...and you were able to execute the code without issues...pls confirm on this...
By any chance, did you try to migrate the Spleeter models into TF2 format of 'savedmodel'? If yes, pls let us know...we are working towards porting spleeter model into edge devices by converting them into TFLite format...Thanks!
@VVasanth Yes I was able to use this code, and I am still using it on my gpu by the way. As I said previously, sadly I did not migrated the spleeter model.
Good luck when porting spleeter into a mobile format, this has a lot of opportunity for the deezer app, allowing any user to listen to a song without the instruments for example!
Hi,
Just wanted to let you know that I upgraded spleeter with tensorflow 2 using
tf_upgrade_v2 --intree ./ --outtree ./ --reportfile report.txt
fromtf2
branch and it is working fine.Of course the script just replace older function by
tf.compat.v1
so it is not the most optimal option..Here is the report: