}
SimpleTensor randomBinaryTensor() {
double range = 1.0 / (4.0 * numHid);
SimpleTensor tensor = SimpleTensor.random(numHid * 2, numHid * 2, numHid, -range, range, rand);
return tensor.scale(op.trainOptions.scalingForInit);
}
SimpleMatrix randomTransformMatrix() {
SimpleMatrix binary = new SimpleMatrix(numHid, numHid * 2 + 1);
// bias column values are initialized zero