Skip to content
Advertisement

Tag: tensorflow

Tensorflow’ pb and pbtxt files don’t work with OpenCV after retraining MobileNet SSD V1 COCO

I have followed this tutorial to retrain MobileNet SSD V1 using Tensorflow GPU as described and got 0.5 loss after training using GPU (below more info about config) and got model.ckpt. This is the command I used for Training: python ../models/research/object_detection/legacy/train.py –logtostderr –train_dir=./data/ –pipeline_config_path=./ssd_mobilenet_v1_pets.config And this is the command for freezing (generate pb file): python ../models/research/object_detection/export_inference_graph.py –input_type image_tensor –pipeline_config_path ./ssd_mobilenet_v1_pets.config

Tensorflow 2.0 – AttributeError: module ‘tensorflow’ has no attribute ‘Session’

When I am executing the command sess = tf.Session() in Tensorflow 2.0 environment, I am getting an error message as below: System Information: OS Platform and Distribution: Windows 10 Python Version: 3.7.1 Tensorflow Version: 2.0.0-alpha0 (installed with pip) Steps to reproduce: Installation: pip install –upgrade pip pip install tensorflow==2.0.0-alpha0 pip install keras pip install numpy==1.16.2 Execution: Execute command: import tensorflow

Split .tfrecords file into many .tfrecords files

Is there any way to split .tfrecords file into many .tfrecords files directly, without writing back each Dataset example ? Answer You can use a function like this: For example, to split the file my_records.tfrecord into parts of 100 records each, you would do: This would create multiple smaller record files my_records.tfrecord.000, my_records.tfrecord.001, etc.

InvalidArgumentError: cannot compute MatMul as input #0(zero-based) was expected to be a float tensor but is a double tensor [Op:MatMul]

Can somebody explain, how does TensorFlow’s eager mode work? I am trying to build a simple regression as follows: Gradient output: [None, None, None, None, None, None] The error is following: Edit I updated my code. Now, the problem comes in gradients calculation, it is returning zero. I have checked the loss value that is non-zero. Answer Part 1: The

ImportError: libcuda.so.1: cannot open shared object file

When I run my code with TensorFlow directly, everything is normal. However, when I run it in a screen window, I get the following error. I have tried the command: But it doesn’t work. Cause I use ssh to connect to the servers, the screen is necessary. How can I fix it? Answer Try to put libcuda.so.1 path to LD_LIBRARY_PATH

How to fine-tune a functional model in Keras?

Taking a pre-trained model in Keras and replacing the top classification layer to retrain the network to a new task has several examples using a Sequential model in Keras. A sequential model has methods model.pop() and model.add() which make this fairly easy. However, how is this achieved when using a functional model? This framework does not have method model.add(). How

Import error: module object detection not found

When i try run code into Jupyter notebook i getting Import error(attached image). I add paths to PYTHON_PATH and add %PYTHON_PATH% in system PATH, but i still get thos error Answer If you are using Anaconda, you must know that it ignores PYTHONPATH!. Use the following commands: conda develop ~/models/research/ conda develop ~/models/research/slim/ here is why you need to do

Keras: Adding MDN Layer to LSTM Network

My question in brief: Is the Long Short Term Memory Network detailed below appropriately designed to generate new dance sequences, given dance sequence training data? Context: I am working with a dancer who wishes to use a neural network to generate new dance sequences. She sent me the 2016 chor-rnn paper that accomplished this task using an LSTM network with

Advertisement