Package ml.shifu.guagua.example.nn
Class NNUtils
- java.lang.Object
-
- ml.shifu.guagua.example.nn.NNUtils
-
public final class NNUtils extends Object
Helper class for NN distributed training.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.encog.neural.networks.BasicNetworkgenerateNetwork(int in, int hidden, int out)Generate basic NN network objectstatic voidrandomize(int seed, double[] weights)static intsign(double value)Determine the sign of the value.
-
-
-
Method Detail
-
generateNetwork
public static org.encog.neural.networks.BasicNetwork generateNetwork(int in, int hidden, int out)Generate basic NN network object
-
sign
public static int sign(double value)
Determine the sign of the value.- Parameters:
value- The value to check.- Returns:
- -1 if less than zero, 1 if greater, or 0 if zero.
-
randomize
public static void randomize(int seed, double[] weights)
-
-