I am trying to replicate YOLO in tensoflow.js. But instead of porting an existing model, because I want to learn how to build models from scratch, I am building it using the layers API.
The problem is the YOLO model uses leaky relu and tensorflow.js does not provide leaky relu as an activation option for conv2d layers. My understanding is that I should use no activation in the conv2d layer and simply add a tf.layers.leakyReLU directly in the model.
I found Pyrhon / Keras awnser How do you use Keras LeakyReLU in Python? But that does not apply to the JS API; especially if I want to run it on my GPU via node.js.
This might sound like the most obvious question, but do I add the leakyReLU before or after the conv2d layer?
Am I missing some bit of API where I can specify an arbitrary activation?