Hello everybody,
that’s my fist post here, so pleas be nice 🙂 I’m totaly new to tensorflow, so this is a beginners guide and no deep dive.
Like you may now the new free MIT intro to Deep Learning Course is online. some of the there given Models are kinda Memory hungry so here the solution:
​
CAUTION: think while coping form online Tutorials!
First of all it is a bless to work with the tensorflow/tensorflow:latest-gpu Docker Container so Yea, just do it.
first some dependencys, the notebooks do need python3-opencv and the lab 1 needs abcmidi and timidity
apt install python3-opencv abcmidi timidity
to edit the code in a personal directory and not in the container you need a non root user
adduser nonroot
login to the user
su - nonroot
install your editor, it’s jupyter lab for me
pip install jupyterlab
start jupyter lab on 0.0.0.0 in the bound directory
jupyter lab --ip 0.0.0.0
add those lines on the top before importing tensorflow
import os os.environ['TF_FORCE_GPU_ALLOW_GROWTH'] = 'true'
and those after importing tensorflow as tf
physical_devices = tf.config.list_physical_devices('GPU') try: tf.config.experimental.set_memory_growth(physical_devices[0], True) except: # Invalid device or cannot modify virtual devices once initialized. pass
Tip: add
%config Completer.use_jedi = False
if you have problems with autocomplete.
I hope that helps somebody!
submitted by /u/deep-and-learning
[visit reddit] [comments]