type conversion between alias types
A matrix type is defined as
Then a Logits type is defined with Matrix with only 1 column:
Got compile error:
1 Reply
LogitsM is a Matrix and you're calling its rand method, which will return a value of type Matrix but the rand method on Logits says it returns a value of type Logits (Self) so you need to convert from Matrix to Logits and it can't do that implicitly. You'll need to write an init method to create Logits from a Matrix