tensorflow2.x

How to efficiently assign to a slice of a tensor in TensorFlow

How to efficiently assign to a slice of a tensor in TensorFlow Question: I want to assign some values to slices of an input tensor in one of my model in TensorFlow 2.x (I am using 2.2 but ready to accept a solution for 2.1). A non-working template of what I am trying to do …

Total answers: 2

Print the detected classes and scores when using TF Object Detection API

Print the detected classes and scores when using TF Object Detection API Question: Hello i’m looking for a way to print out the detected classes and scores while doing an Object Detection with the object_detection_tutorial. Most solutions here are for Tensorflow 1 and do not work anymore. I found one Solution here on StackOverflow but …

Total answers: 1

How to get other metrics in Tensorflow 2.0 (not only accuracy)?

How to get other metrics in Tensorflow 2.0 (not only accuracy)? Question: I’m new in the world of Tensorflow and I’m working on the simple example of mnist dataset classification. I would like to know how can I obtain other metrics (e.g precision, recall etc) in addition to accuracy and loss (and possibly to show …

Total answers: 5

AttributeError: 'Tensor' object has no attribute 'numpy' in Tensorflow 2.1

AttributeError: 'Tensor' object has no attribute 'numpy' in Tensorflow 2.1 Question: I am trying to convert the shape property of a Tensor in Tensorflow 2.1 and I get this error: AttributeError: ‘Tensor’ object has no attribute ‘numpy’ I already checked that the output of tf.executing eagerly() is True, A bit of context: I load a …

Total answers: 2

Tensorboard not found as magic function in jupyter

Tensorboard not found as magic function in jupyter Question: I want to run tensorboard in jupyter using the latest tensorflow 2.0.0a0. With the tensorboard version 1.13.1, and python 3.6. using … %tensorboard –logdir {logs_base_dir} I get the error : UsageError: Line magic function %tensorboard not found Do you have an idea what the problem could …

Total answers: 5

How to prevent tensorflow from allocating the totality of a GPU memory?

How to prevent tensorflow from allocating the totality of a GPU memory? Question: I work in an environment in which computational resources are shared, i.e., we have a few server machines equipped with a few Nvidia Titan X GPUs each. For small to moderate size models, the 12 GB of the Titan X is usually …

Total answers: 16