-
Relu Applies the rectified linear unit activation function
$$max(x,0)$$ -
Softmax Softmax converts a vector of values to a probability distribution
The elements of the output vector are in range [0, 1] and sum to 1
-
Sigmoid
$$sigmoid(x) = 1 / (1 + exp(-x))$$ Sigmoid returns values between 0 and 1
The standard workflow: compile(), fit(), evaluate(), predict()
- Prepare data (reshape, astype)
- Build model (use
kerasspecifying layers and activation function) - Compile model (define optimizer, loss, and metrics)
- Fit model (specify #epochs)
- Use model to make predictions
- Evaluate model using new data (accuracy)
What is tensor?
It's a multi-dimensional array. eg. rank 1 tensor is a vector; rank 2 tensor is a matrix
- It's important to not have sufficiently large intermediate layers
- It's important to have an appropriate learning rate in model complication optimizer.