Hey Everyone! So i am new to the community and I h...
# kotlindl
a
Hey Everyone! So i am new to the community and I have started to get along with the codebase. I was working on Adding Orthogonal Initilizer, altho i saw that showOperand() method reduces the dimension by one. i wonder should this be the right behavior of it?
z
Hi! Could you please share more links and information. What is the problem now?
a
Copy code
val shape = Shape.make(2, 2)
require(shape.numDimensions()>=2){"Test Dimension ${shape.numDimensions()}"}
val operand = instance.initialize(fanIn = FAN_IN,fanOut = FAN_OUT,tf=tf,shape =  shapeOperand(tf, shape), name="default_name")
Now here the 2nd line gives the dimension 2, while once we use shapeOperand(tf,shape) the shape is reduces to dimension 1
The orthogonal initilizer requires to have the tensor with dimension greater or equal to 2
Copy code
val tensor = shape.asOutput().tensor()
val dimsShape = tensor.numDimensions()
require(dimsShape>=2) { "The numDimensions should greater than 2" }
So the shapeOperand(tf, shape) passed above in the Test fails here since here the dimension comes out to be reduced.
z
Sorry for the delay with the answer, I have no quick answer to this question, I'll start the review next week and try to answer your question