تاحالا پیش اومده که بخواید از تنسورفلو یک روی کولب استفاده کنید؟

همون طور که میدونید توی کولب اگه بگید
import tensorflow
tensorflow.__version__
براتون مینویسه
2.8.0
که خب ینی تنسورفلو دو هست.
ولی خیلی کدها هستن که با تنسورفلو یک نوشته شدن و خب یقینا با تنسورفلو دو اجرا نمیشن اینجا لازم نیست درگیر پیپ و حذف و نصب کردن تنسورفلو بشیم خیلی راحت میشه گفت:
%tensorflow_version 1.x
import tensorflow
tensorflow.__version__
و توی خروجی میگه:
TensorFlow 1.x selected.
1.15.2


😁😁😁😁

و البته خود داکیومنتش هم پیشنهاد میده ک از pip استفاده نکنید:
We recommend against using pip install to specify a particular TensorFlow version for both GPU and TPU backends. Colab builds TensorFlow from source to ensure compatibility with our fleet of accelerators. Versions of TensorFlow fetched from PyPI by pip may suffer from performance problems or may not work at all.

@raspberry_python

Comments

Be the first to add a comment