Commit 881dbbd6 authored by Manuel Günther's avatar Manuel Günther
Browse files

Added test case for #5

parent fbc43ac7
......@@ -699,6 +699,8 @@ PyObject* PyBobLearnMLPMachine_Repr(PyBobLearnMLPMachineObject* self) {
* <bob.learn.linear.MLP float64@(3, 5, 2) [hidden: f(z) = tanh(z), out: f(z) = * tanh(z)]>
*/
BOB_TRY
auto weights = make_safe(PyBobLearnMLPMachine_getWeights(self, 0));
if (!weights) return 0;
auto dtype = make_safe(PyObject_GetAttrString(weights.get(), "dtype"));
......@@ -731,6 +733,8 @@ PyObject* PyBobLearnMLPMachine_Repr(PyBobLearnMLPMachineObject* self) {
return retval;
BOB_CATCH_MEMBER("__repr__", 0)
}
PyDoc_STRVAR(s_forward_str, "forward");
......
......@@ -313,3 +313,7 @@ def test_randomness_same():
for b1, b2 in zip(m1.biases, m2.biases):
assert (b1 == b2).all()
def test_write():
m = Machine((1,1,1))
text = str(m)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment