I got an error ,IndexError: list index out of range. it worked on a other machine but after i transferred it to a other machine it doesn’t work anymore. Python: 3.8.5 tensorflow: 2.3.1 Traceback says: My code: I really cannot understand why such an error happens. What is wrong in my codes? How should I …
Tag: tensorflow2.0
How can I select top-n elements from tensor without repeating elements?
I want to select top-n elements of 3 dimension tensor given the picked elements are all unique. All the elements are sorted by the 2nd column, and I’m selecting top-2 in the example below but I don’t want duplicates in there. Condition: No for loops or tf.map_fn() Here is the input and desired_out…
Trying to extract patches from image and getting “UnimplementedError: Only support ksizes across space”
I was trying to split my image through 4 patches when I came through the following error: UnimplementedError: Only support ksizes across space Traceback: Answer After further research I was able to manage by changing from: To : And then reshape to obtain 3 channel images:
Could not load dynamic library ‘cudart64_101.dll’ on tensorflow CPU-only installation
I just installed the latest version of Tensorflow via pip install tensorflow and whenever I run a program, I get the log message: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library ‘cudart64_101.dll’; dlerror: cudart64_101.dll not found Is this bad? How …
Cannot use vggface-keras in Tensorflow 2.0
I am trying to use the keras-vggface library from https://github.com/rcmalli/keras-vggface to train a CNN. I have installed tensorflow 2.0.0-rc1, keras 2.3.1, cuda 10.1, cudnn 7.6.5 and the driver’s version is 418, the problem is that when i try to use the vggface model, as a convolutional base, i get a…
What is the difference between tf-nightly and tensorflow in PyPI?
What is the difference between tf-nightly and tensorflow in PyPI? Which one is reliable? https://pypi.org/project/tf-nightly/ https://pypi.org/project/tensorflow/ Answer Just to add to what Ben Souchet wrote: As its name suggests, the tf-nightly pip package is built and released to PyPI every night (barring a…
Why is TensorFlow 2 much slower than TensorFlow 1?
It’s been cited by many users as the reason for switching to Pytorch, but I’ve yet to find a justification/explanation for sacrificing the most important practical quality, speed, for eager execution. Below is code benchmarking performance, TF1 vs. TF2 – with TF1 running anywhere from 47% to…
How to generate CNN heatmaps using built-in Keras in TF2.0 (tf.keras)
I used to generate heatmaps for my Convolutional Neural Networks, based on the stand-alone Keras library on top of TensorFlow 1. That worked fine, however, after my switch to TF2.0 and built-in tf.keras implementation (with eager execution) I cannot use my old heatmap generation code any longer. So I re-wrote…
Tensorboard not found as magic function in jupyter
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 be? It see…
How to tie weights between transposed layers?
I have try to tied weights in tensorflow 2.0 keras, with below code. but it shows this errors? does anyone know how to write tied weights dense layer ? Errors Answer It took much of my time to figure out, but I think this is the way of Tied Weights by subclassing Keras Dense layer. Hope it can help someone