Skip to content

Commit

Permalink
MAINT: Minor style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
adler-j committed Aug 29, 2017
1 parent e870da8 commit 9923fda
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions odl/contrib/tensorflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ This package contains ODL functionality related to [TensorFlow](https://www.tens

## Example usage

The [examples](examples) folder contains example on how to use the above functionality.
Specifically
The [examples](examples) folder contains examples on how to use the above functionality.
Specifically:

* [tensorflow_layer_matrix.py](examples/tensorflow_layer_matrix.py) shows how an ODL `MatrixOperator` can be converted to a tensorflow layer.
* [tensorflow_layer_productspace.py](examples/tensorflow_layer_productspace.py) shows how an ODL operator acting on `ProductSpace`s can be converted to a tensorflow layer.
* [tensorflow_layer_ray_transform.py](examples/tensorflow_layer_ray_transform.py) shows how a `RayTransform` can be converted to a tensorflow layer.
* [tensorflow_operator_matrix.py](examples/tensorflow_operator_matrix.py) shows how `tf.matmul` can be used as a ODL operator.
* [tensorflow_operator_matrix.py](examples/tensorflow_operator_matrix.py) shows how `tf.matmul` can be used as an ODL operator.
* [tensorflow_tomography.py](examples/tensorflow_tomography.py) shows how tensorflow optimizers can be used with ODL operators to solve inverse problems.

There are also some rudimentary tests in the [test](test) folder.
8 changes: 4 additions & 4 deletions odl/tomo/backends/astra_cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def __init__(self, geometry, reco_space, proj_space):

# Create a mutually exclusive lock so that two callers cant use the
# same shared resource at the same time.
self.mutex = Lock()
self._mutex = Lock()

def call_forward(self, vol_data, out=None):
"""Run an ASTRA forward projection on the given data using the GPU.
Expand All @@ -84,7 +84,7 @@ def call_forward(self, vol_data, out=None):
Projection data resulting from the application of the projector.
If ``out`` was provided, the returned object is a reference to it.
"""
with self.mutex:
with self._mutex:
assert vol_data in self.reco_space
if out is not None:
assert out in self.proj_space
Expand Down Expand Up @@ -213,7 +213,7 @@ def __init__(self, geometry, reco_space, proj_space):

# Create a mutually exclusive lock so that two callers cant use the
# same shared resource at the same time.
self.mutex = Lock()
self._mutex = Lock()

def call_backward(self, proj_data, out=None):
"""Run an ASTRA back-projection on the given data using the GPU.
Expand All @@ -233,7 +233,7 @@ def call_backward(self, proj_data, out=None):
back-projector. If ``out`` was provided, the returned object is a
reference to it.
"""
with self.mutex:
with self._mutex:
assert proj_data in self.proj_space
if out is not None:
assert out in self.reco_space
Expand Down

0 comments on commit 9923fda

Please sign in to comment.