Package com.github.tjake.rbm

Examples of com.github.tjake.rbm.Layer


        return (float) (1.0f / (1.0f + Math.exp(-x)));
    }

    public static Layer bernoulli(Layer input)
    {
        Layer output = input.clone();
        //using uniform distribution, filter out all negative values
        //from inputs, keeping mostly strong weights
        for (int i=0; i<output.size(); i++)
            output.set(i, staticRand.nextFloat() < input.get(i) ? 1.0f : 0.0f);

        return output;
    }
View Full Code Here

TOP

Related Classes of com.github.tjake.rbm.Layer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.