Closed anshuman23 closed 6 years ago
Comments added. Other than that, it looks great to go! :+1:
What next steps do you have in mind? :)
Thanks for the feedback @josevalim!
I have been thinking about the next steps, and the logical progression of adding functions should eventually get to the point where we can run the loaded graph against our own inputs and generate prediction outputs. For this to work, a lot of functions need to be added first: particularly ones that will allow us to read Tensors supplied by the user. I am thinking over how I would accomplish this and then I will submit a PR for review. These TF_Tensor functions are very important and they would have to encompass a wide variety of inputs.
I might also keep importing graph based functions from Tensorflow as and when required (like the operation list function get_graph_ops
) After that, I think some more graph based functions will be needed that will use both the tensor functionality and the graph functions. Finally, we will need to add support for creating and running Sessions.
@anshuman23 agreed! :heart:
Let's go with this plan and continue exploring the API and the "user story" but note that at some point we will have to "sit down" and write documentation and tests.
Also, can you please send an e-mail to the beamcommunity mailing list with your progress so far and your plans for the next week? What is coming next can be a very quick digest, like this one that you just sent!
Thanks @josevalim, and I completely agree on taking time out to write documentation and tests. I will incorporate that into my plans as well. :)
Yes, I'll send that email right away. Thanks again for all the help!
So this PR covers the changes you had last requested @josevalim. Other than that I have just removed some unused code from before. Also ensured I am using
enif_make_binnary
wherever needed instead ofenif_make_string
:error_to_string
handles that now and an example of a faulty graph reading attempt would look like this:get_graph_ops
which returns a List of strings (op names in the graph). An example is as follows:iex(2)> op_list = Tensorflex.get_graph_ops graph ["softmax/biases", "softmax/weights", "pool_3/_reshape/shape", "mixed_10/join/concat_dim", "mixed_10/tower_2/conv/batchnorm/moving_variance", "mixed_10/tower_2/conv/batchnorm/moving_mean", "mixed_10/tower_2/conv/batchnorm/gamma", "mixed_10/tower_2/conv/batchnorm/beta", "mixed_10/tower_2/conv/conv2d_params", "mixed_10/tower_1/mixed/conv_1/batchnorm/moving_variance", "mixed_10/tower_1/mixed/conv_1/batchnorm/moving_mean", "mixed_10/tower_1/mixed/conv_1/batchnorm/gamma", "mixed_10/tower_1/mixed/conv_1/batchnorm/beta", "mixed_10/tower_1/mixed/conv_1/conv2d_params", "mixed_10/tower_1/mixed/conv/batchnorm/moving_variance", "mixed_10/tower_1/mixed/conv/batchnorm/moving_mean", "mixed_10/tower_1/mixed/conv/batchnorm/gamma", "mixed_10/tower_1/mixed/conv/batchnorm/beta", "mixed_10/tower_1/mixed/conv/conv2d_params", "mixed_10/tower_1/conv_1/batchnorm/moving_variance", "mixed_10/tower_1/conv_1/batchnorm/moving_mean", "mixed_10/tower_1/conv_1/batchnorm/gamma", "mixed_10/tower_1/conv_1/batchnorm/beta", "mixed_10/tower_1/conv_1/conv2d_params", "mixed_10/tower_1/conv/batchnorm/moving_variance", "mixed_10/tower_1/conv/batchnorm/moving_mean", "mixed_10/tower_1/conv/batchnorm/gamma", "mixed_10/tower_1/conv/batchnorm/beta", "mixed_10/tower_1/conv/conv2d_params", "mixed_10/tower/mixed/conv_1/batchnorm/moving_variance", "mixed_10/tower/mixed/conv_1/batchnorm/moving_mean", "mixed_10/tower/mixed/conv_1/batchnorm/gamma", "mixed_10/tower/mixed/conv_1/batchnorm/beta", "mixed_10/tower/mixed/conv_1/conv2d_params", "mixed_10/tower/mixed/conv/batchnorm/moving_variance", "mixed_10/tower/mixed/conv/batchnorm/moving_mean", "mixed_10/tower/mixed/conv/batchnorm/gamma", "mixed_10/tower/mixed/conv/batchnorm/beta", "mixed_10/tower/mixed/conv/conv2d_params", "mixed_10/tower/conv/batchnorm/moving_variance", "mixed_10/tower/conv/batchnorm/moving_mean", "mixed_10/tower/conv/batchnorm/gamma", "mixed_10/tower/conv/batchnorm/beta", "mixed_10/tower/conv/conv2d_params", "mixed_10/conv/batchnorm/moving_variance", "mixed_10/conv/batchnorm/moving_mean", "mixed_10/conv/batchnorm/gamma", "mixed_10/conv/batchnorm/beta", "mixed_10/conv/conv2d_params", "mixed_9/join/concat_dim", ...]