How can I train a tensorflow model on another local computer and get its return value?

Viewed 25

So currently I have one computer running MacOS and another computer with a GPU running windows. What's the best way to send data (in this case, 2 images or links to images) from the Mac to the Windows computer, train a model with Tensorflow on the Windows computer, then send the output of the model (another image) back to the Mac? They are both on the same network.

I found a couple solutions so far but I'm not sure which one is optimal:

  • Using Pyro
  • Installing linux on the Windows machine and then SSH'ing onto it like a server

I'm new to setting up any server kind of things so any tips would be great!

1 Answers

Personally I like:

  1. Connecting to the machine with the GPU via ssh
  2. Open a tmux session or something similar so that all that is printed and will be printed inside the terminal is not lost when I disconnect from the ssh. To create the session (after you have installed tmux) the command to write in the terminal is: tmux new -s my_session
  3. Launch the training inside that tmux session.
  4. Detach from the session with Ctrl+b and then d.
  5. Disconnect from the ssh and re-connect from time to time to check the training. After re-connecting to the ssh you just have to attach to the session with tmux attach -t my_session to see what was outputted from the training while you were away.
  6. When the training is finished I ssh the output folder containing images, logs etc. to my other machine.

Surely there are more automated solutions, but this one works the best for me.

Related