Questions tagged [tensorflow2]
54 questions
6
votes
3 answers
How to install tensorflow==2.3.0
I would like to test some function in the new tensorflow2.3 However, I am struggling with installation process.
I saw: How do I install the most recent Tensorflow (here: 2.2) on Windows when conda does not yet support it?
I executed: pip install…

MichalSzczep
- 345
- 1
- 4
- 15
6
votes
1 answer
How to convert from Tensorflow.js (.json) model into Tensorflow (SavedModel) or Tensorflow Lite (.tflite) model?
I have downloaded a pre-trained PoseNet model for Tensorflow.js (tfjs) from Google, so its a json file.
However, I want to use it on Android, so I need the .tflite model. Although someone has 'ported' a similar model from tfjs to tflite here, I have…

Ben Butterworth
- 22,056
- 10
- 114
- 167
5
votes
2 answers
What is difference between "Keras backend + Tensorflow" and "Keras from Tensorflow" using CPU(in Tensorflow 2.x)
I want to limit CPU cores and threads.
So I found three ways to limit these.
1) "Keras backend + Tensorflow"
from keras import backend as K
import tensorflow as tf
config = tf.ConfigProto(intra_op_parallelism_threads=2, \
…

Jihye Seo
- 53
- 5
5
votes
0 answers
tfRecords shown faulty in TF2
I have a couple of own tfrecord file made by myself.
They are working perfectly in tf1, I used them in several projects.
However if i want to use them in Tensorflow Object Detection API with tf2 (running the model_main_tf2.py script), I see the…

Nemes Gyula Ádám
- 189
- 5
4
votes
1 answer
Tensorflow 2 :NotImplementedError: numpy() is only available when eager execution is enabled
There is a question in this code, I delete SeBlock class and just run CNN class, then all is well. If I plug SeBlock to CNN class the error will occur, and display NotImplementedError. I don't know cause this problem, I try to solve this problem,…

张家瑜
- 41
- 4
4
votes
3 answers
Tensorflow 2.2 taking a long time to start
I am trying to run tensorflow on windows 10 with the following setup:
Anaconda3 with
python 3.8
tensorflow 2.2.0
GPU: RTX3090
cuda_10.1.243
cudnn-v7.6.5.32 for windows10-x64
Running the following code takes between 5 ~ 10 minutes to print…

Mfif7
- 41
- 1
- 3
3
votes
1 answer
How to save histogram plots from Tensorboard 2 to disk, just like you can do with scalars?
I am using Tensorboard 2 to visualize my training data and I am able to save scalar plots to disk. However, I am unable to find a way to do this for histogram plots (tf.summary.histogram).
Is it possible to save histogram plots from Tensorboard 2 to…

Daniel Wiczew
- 165
- 9
3
votes
2 answers
TF2 object detection API issue with resuming training from saved checkpoint
I'm facing an issue with TF2 object detection API that seems to have occurred overnight. I'm trying to resume training from a saved checkpoint and as usual I change the path in the config file to where the checkpoints are before resuming the…

Luigi Di Carlo
- 31
- 2
3
votes
1 answer
ValueError: Input 0 of layer global_average_pooling2d is incompatible with the layer: expected ndim=4, found ndim=2. Full shape received: [None, 128]
I load the saved model and for finetuning reason I add classification layers to the output of loaded model, So this what I write :
def create_keras_model():
model = tf.keras.models.load_model('model.h5', compile=False)
resnet_output =…

seni
- 659
- 1
- 8
- 20
3
votes
2 answers
tf.keras.models.model vs tf.keras.model
Is the models redundant in tf.keras API? For some cases, even without using models, the code also runs well.
keras.models.sequential and keras.sequential
tf.keras.models.Model and tf.keras.Model
However, sometimes, models seems to be necessary.…

Albert G Lieu
- 891
- 8
- 16
2
votes
0 answers
Loading Tensorflow 2.6 protocol buffers into Java 8
I have been able to successfully build a transformer network in Tensorflow (v 2.6), produce a protocol buffer (.pb) in python for that model, and then read that back into python for execution.
But when I try to read the .pb into Java 8, I get the…

PatBBound
- 21
- 2
2
votes
1 answer
How to use the optimizer in tensorflow2 correctly?
Im asking myself does the following code do only one step of gradient descent or does it do the whole gradient descent algorithm?
opt = tf.keras.optimizers.SGD(learning_rate=self.learning_rate)
opt =…

Hans Mustermann
- 33
- 4
2
votes
1 answer
Is the CUDA version listed in the Tensorflow installation instructions the maximum or minimum version that can/should be installed?
In the below image tensorflow-2.7 has CUDA version as 11.2 does that mean I can installed
versions > 11.2 or
versions < 11.2 or
must installed 11.2 only.

Vishal Reddy
- 106
- 3
- 11
2
votes
1 answer
Python error in importing Tensorflow 2 . Keras
I did write some deep learning code sometimes ago.Now I want to run it again . But at first it gave me these errors.
here is the first block of code that went into a problem:
import tensorflow.keras
from tensorflow.keras import layers
from…

Mo.be
- 95
- 2
- 11
2
votes
2 answers
Group Conv in TensorFlow 2
Does TensorFlow2.x support Group Convolution?
I have seen a lot of posts/blogs/tutorials saying that TensorFlow does not support it, and I have also seen some posts saying that tf.keras.layers.DepthwiseConv2D is equivalent to group convolution.…

seermer
- 571
- 6
- 12