Finished generic NCA implementation. Should work for Dense and Sparse. Still don't know how to get right implicits in scope to instantiate Trainer...