Question during Dense function using Vectorization

Hey!, i have a question in this topic. When you make the dense function using vectorization, when getting Z now you get a matrix instead of a scalar. When having this, do you need to re-write the sigmoid function in order for it to work given a matrix as an input?

Hello @CoolingCoder,

Usually we implement a sigmoid that accepts array input, such as by using numpy or Tensorflow functions (those functions, such as np.exp, will also accept scalar by the way).

So yes, we need to make sure it can work with an array! :wink:


1 Like