tensorflow / rust

Rust language bindings for TensorFlow
Apache License 2.0
5.19k stars 422 forks source link

Distributed training #362

Open rhobro opened 2 years ago

rhobro commented 2 years ago

Hi there,

Like tensorflow python has tf.distribute, what is the equivalent for the rust version?

Thanks

Corallus-Caninus commented 2 years ago

there should be something in the private section of the codebase under config where you can specify this (I am basing this off memory) I'll follow up with more information when I get back to deving this project (I want to use TPUs which is a strategy spec).

rhobro commented 2 years ago

Upon searching the repo for "distribut" it doesn't return any results.

Corallus-Caninus commented 2 years ago

You would probably pass the strategy as a string into a config struct.

Corallus-Caninus commented 1 year ago

https://www.tensorflow.org/api_docs/cc/class/tensorflow/client-session#classtensorflow_1_1_client_session_1ac52798100986741ff24aba4a758d8e4d

Shows how a client can connect and it seems with SessionOptions you can specify these parameters.

https://docs.rs/tensorflow/0.19.1/tensorflow/struct.SessionOptions.html

I might be trying this soon and am also unsure.