Created
August 5, 2015 18:14
-
-
Save leconteur/6940d33bf79a1b20600f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
linear = MLP([Identity(), Identity()], [2, 10, 2], weights_init=Constant(1), biases_init=Constant(2)) | |
x = tensor.matrix('x') | |
y_hat = linear.apply(x) | |
cost = .... | |
cg = ComputationGraph(y) | |
weights = VariableFilter(roles=[WEIGHTS])(cg.variables) | |
cg = apply_dropout(cg, weights, 0.5) | |
target_cost = cg.outputs[0] | |
algorithm = GradientDescent(cost=target_cost, params=cg.parameters,...) | |
extensions = [..., DataStreamMonitor([cost],..] | |
main_loop = MainLoop(algorithm, ..., model=linear, extensions=extensions) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment