Skip to content
Snippets Groups Projects
Commit 7ae8fc81 authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

Changed the pickle reference to JSON reference

parent 661b554b
No related branches found
No related tags found
1 merge request!11WIP: First attempt to approach the issue bob.bio.base#106
Pipeline #32575 failed
{"activation": 1, "biases": [0.3, -3.0], "input_div": [0.5, 1.0, 1.0], "input_sub": [0.0, 0.5, 0.5], "weights": [[0.4, 0.1], [0.4, 0.2], [0.2, 0.7]]}
\ No newline at end of file
File deleted
...@@ -27,7 +27,7 @@ import bob.io.base ...@@ -27,7 +27,7 @@ import bob.io.base
from bob.learn.activation import HyperbolicTangent, Identity from bob.learn.activation import HyperbolicTangent, Identity
from bob.io.base import HDF5File from bob.io.base import HDF5File
from bob.io.base.test_utils import datafile from bob.io.base.test_utils import datafile
import json
def F(f): def F(f):
"""Returns the test file on the "data" subdirectory""" """Returns the test file on the "data" subdirectory"""
...@@ -36,12 +36,12 @@ def F(f): ...@@ -36,12 +36,12 @@ def F(f):
) )
MACHINE = F("linear-test.pickle") MACHINE = F("linear-test.json")
def load_machine(): def load_machine():
with open(MACHINE, "rb") as machine_pickle: with open(MACHINE, "r") as machine_json:
return pickle.load(machine_pickle) return json.load(machine_json)
def test_initialization(): def test_initialization():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment