Questions tagged [tensorflow-addons]
19 questions
2
votes
2 answers
PyTorch equivalent function for tfa.image.transform
I want to perform an image transformation using a transformation matrix in PyTorch. My previous code was implemented in TensorFlow, so I wonder if there is any PyTorch equivalent function for tfa.image.transform ?
Thank you.

Naufal Suryanto
- 77
- 7
2
votes
1 answer
How to get learning rate of AdamW optimizer (using multioptimizer)
I am using AdamW optimizer with two different learning rates: One for pre-trained layer and the other for custom layer
import tensorflow_addons as tfa
lr = 1e-3
wd = 1e-4 * lr
optimizers = [
tfa.optimizers.AdamW(learning_rate=pre_trained_layer_lr ,…

learner
- 828
- 2
- 19
- 36
2
votes
1 answer
Tensorflow Addons R2 ValueError: Dimension 0 in both shapes must be equal, but are 1 and 5
I have been trying to add a tfa metric to my model compile to be tracked throughout the training. However, when I add the R2 metric, I get the following error. I thought y_shape=(1,) would fix this, however it did not.
ValueError: Dimension 0 in…

Jehan Dastoor
- 647
- 1
- 8
- 15
2
votes
0 answers
How to show f1 scores for each class in tensorboard during training
I am training a multi-class classification network. I use metrics from tensorboard-addons and compile the model like this:
import tensorflow-addons as tfa
[...]
metrics = [tfa.metrics.F1Score(num_classes=CLASSES,…

Konqi
- 93
- 1
- 8
1
vote
0 answers
What does the semi hard triplet loss function from tensorflow_addons actually do?
In my humble opinion, the simple answer to this question, it implements the semi hard triplet loss function as described in the paper "FaceNet: A Unified Embedding for Face Recognition and Clustering" is not true. Contrary to the paper, it does not…

Wonderer
- 11
- 2
1
vote
1 answer
multi-output keras model with a callback that monitors two metrics
I have a tf model that has two outputs, as indicated by this model.compile():
model.compile(optimizer=tf.keras.optimizers.Adam(learning_rate=7e-4),
loss={"BV": tf.keras.losses.MeanAbsoluteError(), "Rsp":…

Ondrej_D
- 65
- 5
1
vote
0 answers
**TypeError: can't pickle tensorflow.python.client._pywrap_tf_session.TF_Operation objects**
I am using Tensorflow-addons API for a machine translation project.
I want to load my models and do predictions without train them again.
My architecture is Encoder - Decoder with Bahdanau Attention mechanism.
When I try to serialize, with dill…

Madibaba Diakite
- 11
- 4
1
vote
1 answer
How to resolve compatibility issues for Tensorflow and associated packages?
I cannot find a way to pip install the following Python modules without compatibility issues (from a requirements.txt file, on Red Hat Enterprise Linux release 8.2):
tensorflow_gpu
tensorflow_addons
tensorflow_io
pandas
pillow
matplotlib
I tried to…

Manuel Popp
- 1,003
- 1
- 10
- 33
1
vote
1 answer
ValueError: Dimensions must be equal, but are 100 and 19 with input shapes: [?,100], [?,100,19]
I have an error in my code, and I've done read the documentation but it still error, How this error can be fixed?
Code:
import tensorflow.keras.backend as K
import tensorflow_addons as tfa
from tensorflow_addons.layers import CRF
from keras_crf…

Aizayousaf
- 39
- 15
1
vote
1 answer
CRF layer ValueError: Dimensions must be equal, but are 75 and 8 for
I am using BiLSTM-CRF for the NER problem when I build the layers and successfully generate the summary, however, when I try to train the model it gives me the Dimension error. It was working fine when I am using Keras and Keras-contrib packages…

user3309779
- 31
- 1
- 1
- 6
0
votes
0 answers
Tensorflow function tfa.optimizers.extend_with_decoupled_weight_decay() Raises Exception upon Execution
Recently, I’ve been working on machine learning using Tensorflow 2. My code requires the tfa.optimizers.extend_with_decoupled_weight_decay() function implemented in the Tensorflow-addons package (TFA).
However, during execution, the code raises a…
0
votes
0 answers
ValueError: Unknown layer: Addons>InstanceNormalization
I tried to load my weight into my model, but i got the following the error.
ValueError: Unknown layer: Addons>InstanceNormalization
I have already search for similar problems, the error they got as follow.
ValueError: Unknown layer:…

K.S.
- 1
- 3
0
votes
0 answers
Does tensorflow_addons conflict with tensorflow?
I'm able to run an ANN model using tensorflow and keras as below:
import tensorflow as tf
from keras.models import Sequential
from keras.layers import Dense
firstModel = Sequential()
Since I need to use RSquared metric (R2), I installed…

Ashi
- 53
- 4
0
votes
1 answer
TypeError identified in implementing ‘WeightNormalization’ layer within tensorflow-addon
I found the error below when I followed the example code of 'WeightNormalization' wrapper implemented in the tensorflow-addons.
The environment is
OS: Ubuntu 18.04LTS
Tensorflow: 2.11 (latest-gpu), typeguard==3.0.1
python: 3.8.10
I identify the…

zwldwhdk
- 1
0
votes
0 answers
ESN slow to train model
I have been using Keras Conv1D layer to train a forecast model. Like this:
model = Sequential(name='Conv1D_NE')
model.add(InputLayer((57, 1), name='Input_Layer'))
model.add(Conv1D(filters=256, kernel_size=4, activation=['tanh'],…

Murilo
- 533
- 3
- 15