All Questions
Tagged with performance keras
67
questions
0
votes
0
answers
71
views
Keras training speed with PyTorch backend is a lot slower than with TensorFlow
I am on native Windows and I used old Keras with TensorFlow 2.10 (GPU accelerated) before. I wanted to try Keras 3 with PyTorch backend.
Can someone please help me why this model trains 10x slower ...
0
votes
0
answers
48
views
I want to measure the communication latencies between the CPU and Memory when i execute one layer of DNN on CPU_i and next layer on CPU_j
i am using the python and tensorflow keras to implemet my neural network,psutil to schdule layers on CPUs. how can i measure the exact communication latency?
i have tried with the following code, but ...
0
votes
0
answers
66
views
Keras 5x faster than Pytorch in basic example
I noticed a big difference in training time for a Keras example and the equivalent Pytorch code, taking this last 5x as much time as Keras. In fact, the DataLoader alone takes more time than Keras. I'...
1
vote
1
answer
40
views
invalid results of process_time() when measuring model.fit() performance
I use the snippet below to measure and output the time spent during model fitting.
perf_counter_train_begin = time.perf_counter()
process_time_train_begin = time.process_time()
model.fit(data, ...)
...
0
votes
0
answers
86
views
Why is my model giving different results with the same parameters?
I am tuning my model with these parameters:
param_grid = {
'unit_1': 128,
'unit_2': 64,
'lr': 3e-4,
'activ': 'relu',
'epochs': 400,
'batch_size': 8}
Which is to say, I already know the parameters ...
0
votes
1
answer
224
views
Traing is very slow when add a custom layers. I found this tensor ops run on cpu not on gpu,I don't konw why?
tensorFlow version (use command below): tensorflow 2.4
Python version: 3.7.9
CUDA/cuDNN version: 10.1
Traing is very slow when add a custom layers. I found this tensor ops run on cpu not on gpu,I don'...
1
vote
2
answers
1k
views
Keras model.fit() taking ages and not showing progress bar
I'm working on a handwritten digits problem. Hopefully my code is self-explainable enough.
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras.utils import to_categorical
import ...
0
votes
0
answers
55
views
Tensorflow - Keras, training on GPU is much slower then on CPU [duplicate]
I'm trying to figure out the reasoning behind the slow performance I get while training when using a GPU runtime.
Data: Ragged tensors of 11 feature. shape:(49724, None, 11).(Download dataset from ...
-1
votes
1
answer
557
views
Improving the performance of an autoencoder network [closed]
For a couple of days, I am working to improve the performance of my autoencoder network, from changing the network architecture to manually tuning some parameters and lately using optuna to optimize ...
-1
votes
1
answer
685
views
Significantly lower accuracy and loss between TensorFlow versions (2.1.0 and 2.4.0)
I was testing whether my DenseNet-121 implementation would work over GPU (RTX 2060) on Ubuntu, but when it ran successfully, I observed that loss and accuracy performed significantly worse than the ...
0
votes
0
answers
203
views
Jetson Nano low CNN inference performance
I'm running what I believe is a pretty small CNN on an nVidia Jetson Nano with Jetpack 4.4.
nVidia claims the Nano can run a ResNet-50 at 36fps, so I expected my much smaller network to run at 30+ fps ...
2
votes
1
answer
1k
views
How can I speed the training up for a model with a custom loss function in Keras?
I defined a custom loss function for Deep Metric Learning in Keras, and I get abysmal performance in Colab with a GPU accelerator, notwithstanding the simplicity of the problem. What can I do to speed ...
1
vote
1
answer
323
views
Is there a difference in speed between tf.keras.Model subclass implementation and equivalent tf functional API implementation?
Let's assume we have two equivalent models which have the same inputs, layers and outputs, except one is implemented as a tf.keras.Model subclass, and the other is implemented in the tf functional API....
7
votes
1
answer
6k
views
Tensorflow model prediction is slow
I have a TensorFlow model with a single Dense layer:
model = tf.keras.Sequential([tf.keras.layers.Dense(2)])
model.build(input_shape=(None, None, 25))
I construct a single input vector in float32:
...
0
votes
1
answer
538
views
How to pick/configure AWS GPU Instances to speed up TensorFlow.keras?
I have a LSTM tf.keras model with about 600MB of training data. It takes about 90 seconds for each training epoch. I have the latest version of tensorflow, which is v2.2. It runs on an AWS g3.4xlarge ...