Skip to content
Snippets Groups Projects
Commit 2f3b5b1f authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Lint

parent bfc24760
No related branches found
No related tags found
No related merge requests found
...@@ -100,7 +100,9 @@ def tensor_to_gpuarray(tensor): ...@@ -100,7 +100,9 @@ def tensor_to_gpuarray(tensor):
raise ValueError( raise ValueError(
'Cannot convert CPU tensor to GPUArray (call `cuda()` on it)') 'Cannot convert CPU tensor to GPUArray (call `cuda()` on it)')
else: else:
return pycuda.gpuarray.GPUArray(tensor.shape, dtype=torch_dtype_to_numpy(tensor.dtype), gpudata=tensor.data_ptr()) return pycuda.gpuarray.GPUArray(tensor.shape,
dtype=torch_dtype_to_numpy(tensor.dtype),
gpudata=tensor.data_ptr())
def gpuarray_to_tensor(gpuarray, context=None): def gpuarray_to_tensor(gpuarray, context=None):
......
...@@ -6,7 +6,8 @@ Advantages: ...@@ -6,7 +6,8 @@ Advantages:
- Custom Ops will be serializable - Custom Ops will be serializable
Disadavantages: Disadavantages:
- C++ Code has to be build with correct parameters and ABI for present Tensorflow version (best integrated into Tensorflow build) - C++ Code has to be build with correct parameters and ABI
for present Tensorflow version (best integrated into Tensorflow build)
""" """
......
from lbmpy.autodiff._autodiff_lbstep import AutoDiffLatticeBoltzmannStep from lbmpy.autodiff._autodiff_lbstep import AutoDiffLatticeBoltzmannStep
from lbmpy.autodiff.adjoint_boundaryconditions import AdjointBoundaryCondition from lbmpy.autodiff.adjoint_boundaryconditions import AdjointBoundaryCondition
__all__ = ['AutoDiffLatticeBoltzmannStep', 'AdjointBoundaryCondition']
...@@ -24,5 +24,3 @@ def tf_variable_from_field(field, init_val=0, constraint=None): ...@@ -24,5 +24,3 @@ def tf_variable_from_field(field, init_val=0, constraint=None):
def tf_placeholder_from_field(field): def tf_placeholder_from_field(field):
return tf.placeholder(dtype=field.dtype.numpy_dtype, name=field.name + '_placeholder', shape=field.shape) return tf.placeholder(dtype=field.dtype.numpy_dtype, name=field.name + '_placeholder', shape=field.shape)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment