Tensorflow and Protobuf....

Hi!
Thanks for your reply.

I’m new to all of this so sorry in advance :)
I’m trying to run a code in python 2.7 that uses tf 1.0.1.

Actually… the code DOES import tf twice, as it comprises of two major files. In each of them, I moved the import as close to the start of the file as possible, but this didn’t help.
In particular, I get my kick when using:
“initializer=tf.contrib.layers.xavier_initializer_conv2d()”

BTW I tried to compile protobuf 3.1.0 and think I succeeded, as you did.
However, I don’t know how to link this to tf and still get this error, and have the feeling that rebuilding tf won’t solve this.

Many thanks and stay strong, plz update of any progress :)

Matan

Are you just using TF directly ?

I think the issue here is similar to mine - i could upgrade protobuf from source BUT it would not link. It was a couple of months ago now so my memory is a bit hazy but essentially i came to the conclusion that the version of protobuf on the jetson / tegra would always take precedence over any updates. For some reason linking the new version was much more of a headache than it should be so finding a workaround is going to be preferable.

I dont actually think its got anything to do with TF per se and recompiling wont make much diff (or it didnt for me so you might want to save some time here)

Have you made your code modular? One way to debug this (this is what i did) is to boot up python from terminal and just run your script line by line to see where it grumbles - that way your going to find out where the problem is. If your importing TF more than once i think thats could be where the problem is. Can you make your script more modular and break it up into two scripts and call TF at the start of each?

Another alternative that might be a bit more extreme - what about rebuilding what you have using Keras as the API as the workaround for me should just as easily work for you. Thats going to depend on how much you want to learn a new library / figure out an existing route forward with the tech stack you have.

I got really really frustrated with the protobuf stuff - asked on a bunch of forums etc and was very glad to find a way forward so i do feel your frustration here however as we are using slightly diff tech stacks there is only so much i can do to help.

Best

Hi @yes_yes_yall,

Many thanks for your help!
I think the code is modular and in each file tf is imported once at the start of each.
So I’ll try using Keras as you mentioned.

Best regards, Matan