|
From: | Christopher Richardson |
Subject: | Re: [Discuss-gnuradio] gr-inspector example `amc_cnn` fails |
Date: | Mon, 9 Jan 2017 23:44:07 +0000 |
Hey Chris -What is the `TF AMC Model` block expecting, exactly, in the "Graph File" field? Based on the earlier discussion, my understanding is that the block needs not just the graph file, but also the weights.A different way to ask the question, perhaps, is how are you writing your trained models to disk so that you can then use them from within this block?Cheers,BenOn Sat, Jan 7, 2017 at 5:34 AM, Christopher Richardson <address@hidden> wrote:Hi Ben,Yeah with respect to the shifts, that was just to do with the Python flowgraph where I generated the training data for the CNN model in mycnn_generate.py script. I notice the generation code for RadioML is now available https://github.com/radioML/dataset :)I'm currently trying to find out why Keras & TensorFlow Serving, no longer seem to be saving the model in the same way as before, as I get an error message whenloading the model via the amc_cnn graph:
"""
handler caught exception: Attempting to use uninitialized value convolution2d_1_W_1
[[Node: convolution2d_1_W_1/read = Identity[T=DT_FLOAT, _class=["loc:@convolution2d_1_W_1"], _device="/job:localhost/replic a:0/task:0/cpu:0"](convolution 2d_1_W_1)]]
Caused by op u'convolution2d_1_W_1/read', defined at:
"""Yeah I think that's a good idea adding notes in the flow graph. I'll just try to solve the loading issue, then I'll do that.CheersChrisOn Sat, Jan 7, 2017 at 2:14 AM, Ben Hilburn <address@hidden> wrote:Hey Chris -Thanks for the guidance! With Tim O'Shea's help, I was able to create & train the TensorFlow model in the RadioML repository. I noticed that you made an update to the README steering folks away from the CNN model, for the moment:Please use the FAM model at the moment, I'm just tweaking the CNN model, as I need to implement 64 sample shifts.I'm assuming that refers to the CNN model in your repository (https://github.com/chrisruk/models ), and not CNN models, generally? I'm going to give the `amc_cnn` flowgraph another shot with my newly trained CNN as soon as I get the chance.Once I get everything up and running and have a better understanding of how it works, I'd like to create some more documentation about how to get this up and running. Your (and Sebastian's) work in `gr-inspector` is not only really impressive but also timely & very useful, and I want to make it accessible to as many people as possible. Even some small notes in the flowgraph about needing a trained model would be helpful, as right now this example relies on the user just knowing that's a necessary prerequisite.I'll keep you posted on my progress =)Cheers,BenOn Fri, Jan 6, 2017 at 5:24 AM, Christopher Richardson <address@hidden> wrote:ChrisHi Ben,I just found this awesome example in the RadioML repo
https://github.com/radioML/examples/blob/master/modulation_r ecognition/RML2016.10a_VTCNN2_ example.ipynb Which I'd not seen before, I'll update my CNN model generation to make sure it creates the model in the same way as that.(Sorry if you get this mail twice Ben, I forgot to hit reply to all first time)CheersOn Fri, Jan 6, 2017 at 12:21 AM, Christopher Richardson <address@hidden> wrote:ChrisHi BenI think it looks like you haven't generated the model, if I'm understanding correctly, for the GRC file.
At the moment the code to generate the models is at:
https://github.com/chrisruk/models Tomorrow I'll check that the model generation works with the latest version of TensorFlow for you.If anyone has experience with Keras, I'd love to have someone have a look over of the correctness of the models,as I seem to have lower accuracy with the Keras models, than when they where implemented with TFLearn if I recallcorrectly, which is very odd.CheersOn Thu, Jan 5, 2017 at 9:45 PM, Ben Hilburn <address@hidden> wrote:Hey all -I'm trying to get some of the tensorflow gr-inspector examples up and running, and running into a few hiccups (note that the non-tensorflow flowgraps work fine). I'm using the non-GPU version of tensorflow (`$ sudo pip install tensorflow`) as I don't have an nVidia GPU.With the `amc_cnn` example, I was first getting the following error:Not really being sure what that was, I created the `/tmp/cnn/00000001/` directory, touched the `export.meta` file, and moved on (this may have been my first mistake).RuntimeError: Expected meta graph file missing /tmp/cnn/00000001/export.metaAnyway, it gets a bit further, but dies with this:Executing: /usr/bin/python2 -u /home/bhilburn/code/gnuradio/gr-inspector.git/examples/top_b lock.py Traceback (most recent call last):File "/home/bhilburn/code/gnuradio/gr-inspector.git/examples/top_ block.py", line 139, in <module> main()File "/home/bhilburn/code/gnuradio/gr-inspector.git/examples/top_ block.py", line 127, in main tb = top_block_cls()File "/home/bhilburn/code/gnuradio/gr-inspector.git/examples/top_ block.py", line 75, in __init__ self.inspector_tfmodel_vcf_0 = inspector.tfmodel_vcf("complex64",128,'/tmp/cnn/00000001',() ,0) File "/home/bhilburn/usr/lib64/python2.7/site-packages/inspector/ tfmodel_vcf.py", line 64, in __init__ sess, inp, out,classes = self.load_graph(graphfile)File "/home/bhilburn/usr/lib64/python2.7/site-packages/inspector/ tfmodel_vcf.py", line 88, in load_graph signatures_any[0].Unpack(signatures) File "/usr/lib/python2.7/site-packages/google/protobuf/internal/c ontainers.py", line 204, in __getitem__ return self._values[key]IndexError: list index out of rangeAny ideas / pointers?Cheers,Ben
[Prev in Thread] | Current Thread | [Next in Thread] |