Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Keras is a popular, open-source deep learning API for Python built on top of TensorFlow and is useful for fast implementation. Topics include efficient low-level tensor operations, computation of arbitrary gradients, scalable computations, export of graphs, etc.
2
votes
Accepted
Efficacy of model depends on scaling?
The answer to your question is: yes, efficacy of a model depends on scaling. It's very important to scale your variables in the right range and combine them with the right activation function.
The re …
1
vote
Is there a different between one hot encoding and labelling categorical as scalar value and ...
The second option is wrong. If you label Male, Female, Undefined as [0, 1, 2] you are treating categories as numbers. That is not correct. The Network in this way would learn something such as Undefin …
1
vote
When should the Keras functional API be used?
Sequential API is simpler to write and to read. Functional API on the other hand gives you more freedom in the implementation of the ANN architecture. More specifically, Functional API is what you nee …
3
votes
Accepted
What is the meaning of the parameter "metrics" in the method model.compile in Keras?
The argument metrics is meant to define your criterion for training evaluation. Let me make an example: if you are training a classifier, you want to evaluate your model based on how accurate (in perc …
0
votes
Training a CNN to convert ellipses into circles
You can take a look at this implementation of a Denoising Autoencoder on the Keras website. I think that's a good start. …
1
vote
Accepted
Do I need to convert strings before using LSTM?
This can be done with libraries such as gensim, or using Keras Embedding() layers.
A more extreme, time consuming option is to use character embeddings. …
5
votes
How can I build a self-attention model with tf.keras.layers.Attention?
Self attention is not available as a Keras layer at the moment. …
4
votes
How to create custom Activation functions in Keras / TensorFlow?
The trick is to use Keras' backend funcions:
from keras import backend as K
def my_function(x):
x = K.some_function(x)
return x
where "some_function" is what you need. …
3
votes
Can we use Binary Cross Entropy for Multiclass Classification?
It depends on the problem at hand.
Follow this schema:
Binary Cross Entropy: When your classifier must learn two classes. Used with one output node, with Sigmoid activation function and labels take …
1
vote
Accepted
CNN always predicts either 0 or 1 for binary classification
Sigmoid functions might have saturation problems. The values that it receives are probably too far from zero, and the sigmoid is returning 'extreme' results (i.e.: 0 or 1). I suggest you to keep your …
1
vote
How to train the model with for loop instead of the built-in epochs
You can do it creating a custom training function. I have created a whole set of TensorFlow 2 tutorials about it. It's simpler than it looks like.
This is the code of some generic training function:
i …
1
vote
Fitting ANN model to my dataset
Adding to @vico 's answer:
In order to use binary crossentropy loss you need a one hot encoded target variable. Your output layer, instead, has only one node.
1
vote
How to input data to LSTM?
RNN input data must follow this pattern:
( Number of observations , Number of input series , Window size )
Keep the number of observations to None when you define the LSTM input_shape. The numbe …
1
vote
0
answers
234
views
How to implement N-Dimensional Convolution in TensorFlow / Keras? (with N > 3)
However, I can't find anything higher than 3D Conv on the TF 2.0 / Keras module.
Is there a way to implement multimensional, ND Conv? (N > 3) …
0
votes
Accepted
Keras models break when I add batch normalization
When you wrote this:
a = BatchNormalization()(a)
you assigned the object BatchNormalization() to a. The following layer:
a = Activation("relu")(a)
is supposed to receive some data in numpy array …