字幕列表 影片播放 列印英文字幕 PAIGE BAILEY: TensorFlow 2.0 has arrived with a focus on usability, developer productivity, and simple, intuitive APIs. If you like Keras and you like Eager Execution, you will love TF 2.0. And if you're a longtime fan of the original TensorFlow, you'll still have the low-level control that you've come to expect. Over the last few years, we've added a large number of components to TensorFlow. And with TF 2.0, these components are packaged together into a comprehensive platform that supports machine learning workflows through training and deployment. This TensorFlow 2.0 release includes many API changes such as argument reorders, API symbol renames, and more. The TF upgrade V2 tool helps the transition by converting existing TensorFlow 1.12 Python scripts to TensorFlow 2.0 preview scripts. Let's dive into collab and see how you would upgrade. To use the TensorFlow upgrade V2 script, all you need to do is PIP install the TF nightly preview. Once that's done, you can preface your command with an exclamation point. Here we can see that we're specifying an in file, text generation dot PUI, and the name of an out file, so text generation upgrade dot PY. We hit Shift Enter, and we're immediately displayed output code showing all of the conversions that have taken place due to this upgrade script. We can take a look at the report dot text, and we can also check to make sure that the original script has been modified with compact V1 terms. That's it. You successfully upgraded a TensorFlow model. Some warnings, do not update parts of your code manually before running the script. In particular, functions that have had reordered arguments, like TF dot argmax or TF dot batch to space, cause the script to incorrectly add keyword arguments, and they get mismapped. This script does not reorder arguments. Instead, it adds keyword arguments to functions that have had their arguments reordered. The conversion process is not able to upgrade all functions. One notable example is TF dot NN dot com 2d, which no longer takes they use cuDNN on GPU argument. If the script detects this, it'll report to standard out and in the report, and you can fix it manually. For example, if you have this, you'll need to change it to this. Excellent work. You just learned how to upgrade your legacy TensorFlow code to TensorFlow 2.0 with the TF 2.0 upgrade script. If you run into any snags while doing your model conversions, please let us know by filing an issue on GitHub. And if you have any feedback on TensorFlow 2.0, make sure to let the team know by sending an email to testing@TensorFlow.org. You can find a link to that in the video description below. We're excited to hear what you think and happy engineering.
B1 中級 升級您現有的TensorFlow 2.0代碼(編碼TensorFlow)。 (Upgrade your existing code for TensorFlow 2.0 (Coding TensorFlow)) 1 0 林宜悉 發佈於 2021 年 01 月 14 日 更多分享 分享 收藏 回報 影片單字