Closed seranus closed 6 years ago
I tried, and it's quite easy, though absolutely not officially supported. Before you load your model, add elements to KerasJS.layers:
require("keras-js").layers["LayerName"]=(class LayerName ... {constructor(attrs){...} call(x){return x;}});
x is a tensor, attrs is some initialization parameters. Refer to other Layers for weight loading et al.
Most layers are fairly simple, so it should be easy to get the hang of, though it might be a bit fiddly to inherit from the base Layer straight up depending on where and how you're using it.
yeah, I managed to write a CPU version of it, stuck on gpu.
I have to reshape -> permute -> reshape.
I not sure do I have create the index map before every step or just once at the process start
Is there a way to implement custom layers or if not a ETA on the feature?