Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [custom-layer]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
9 views

Keras siamese model history is empty

I am making a siamese neural network with triplet loss using keras, and have encountered an odd problem. I tried saving my history twice: once in a callback (saved as a dictionary), and once after ...
Rotem Ton's user avatar
0 votes
0 answers
16 views

Is my SPP layer well implemented on the CNN model?

Im doing a CNN model with transfer learning from a VGG16 model but Im adding a Spatial Pyramid Pooling layer on top, I have tried with different data-bases and it has worked, but I'm not sure if its ...
Belat's user avatar
  • 1
0 votes
0 answers
16 views

Tensorflow RNN - implementing recursive layer

I am dealing with a regression problem, for which I wanted to try to use a recurrent neural network. The general setting is that I have to predict a continuous quantity starting from the evolution, in ...
ChristianC's user avatar
0 votes
0 answers
94 views

Siamese Network in TensorFlow employing Triplet Loss

I am constructing a siamese network using tensorflow which uses triplet loss. My inputs are of shape (100,100,1) and I have made a CNN embed_model to so that the output is a tensor with 50 points. Now ...
Adveat Prasad Karnik's user avatar
0 votes
1 answer
67 views

Transpose of a 3D tensor

I need to transpose a 3-dimensional tensor of the shape (batch_size, N, M) to (batch_size, M, N) in a custom loss function in Keras with tensorflow as the backend. I tried using the following function ...
Doc Jazzy's user avatar
0 votes
0 answers
26 views

Keras Custom Layer Aware of Position in Network

I'm writing a custom Layer in TF/Keras (tf.keras.layers.Layer) for a CNN, and I need each layer to know its own depth in the model. Is there any way I can do this, ...
Liam F-A's user avatar
1 vote
1 answer
937 views

Determine batch size during `tensorflow.keras` Custom Class `call` method

I'm building a custom keras Layer similar to an example found here. I want the call method inside the class to be able to know what the ...
Jed's user avatar
  • 129
1 vote
0 answers
279 views

How to define a custom layer in pytorch

I am new to PyTorch and seeking your help regarding a problem I have. I need to add a costume layer to a NN in training phase. Please see the figure which shows a simple DNN with the custom layer. NN ...
zstr's user avatar
  • 13