1

Could you please let me know how I designate which instance to use when training/testing SyntaxNet?

In other tensorflow models we can easily change configurations by editing Python code:

ex) tf.device('/cpu:0') => tf.device('/gpu:0').

I could run parsey mcparseface model via running demo.sh and I followed back symbolic links to find device configurations.

Maybe I misedBut I cannot find gpu configuration python codes in demo.sh, parser_eval.py and context.proto.

When I search with query 'device' in tensorflow/models, I could see several C files such as syntaxnet/syntaxnet/unpack_sparse_features.cc contain line using tensorflow::DEVICE_CPU;

So.. is to change C codes in these files the only way to change device configuration for SyntaxNet?

I hope there is a simpler way to change the setting in Python level.

Thanks in advance.

J-min
  • 457
  • 4
  • 9

1 Answers1

0

You can refer to this page for instructions on running syntax net on GPU: https://github.com/tensorflow/models/issues/248

Tensorflow would automatically assign devices including GPU to the ops: https://www.tensorflow.org/versions/r0.11/how_tos/using_gpu/index.html. You can also manually specify the device when building the graph.

yuefengz
  • 3,338
  • 1
  • 17
  • 24