MCPcopy Create free account
hub / github.com/BVLC/caffe / python_net_file

Function python_net_file

python/caffe/test/test_python_layer.py:59–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

57 top[0].data[()] = self.phase
58
59def python_net_file():
60 with tempfile.NamedTemporaryFile(mode='w+', delete=False) as f:
61 f.write("""name: 'pythonnet' force_backward: true
62 input: 'data' input_shape { dim: 10 dim: 9 dim: 8 }
63 layer { type: 'Python' name: 'one' bottom: 'data' top: 'one'
64 python_param { module: 'test_python_layer' layer: 'SimpleLayer' } }
65 layer { type: 'Python' name: 'two' bottom: 'one' top: 'two'
66 python_param { module: 'test_python_layer' layer: 'SimpleLayer' } }
67 layer { type: 'Python' name: 'three' bottom: 'two' top: 'three'
68 python_param { module: 'test_python_layer' layer: 'SimpleLayer' } }""")
69 return f.name
70
71
72def exception_net_file():

Callers 1

setUpMethod · 0.85

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected