Comments (4)
I meet the same problem!
from odl.
Just lower your pytorch version to below 1.3, but I am also solving this problem that occurs above version 1.3, and I am researching...
from odl.
Hi,
I am using almost the latest pytorch (1.12.1.post201) and I have no such problem with the binding.
I imagine that part3_learned_reconstruction_pytorch.ipynb can have some outdated code, however
the following code runs as expected:
import matplotlib.pyplot as plt
import numpy as np
import odl
import torch
from odl.contrib.torch import OperatorModule
print(torch.version)
X = odl.uniform_discr([-10, -10], [10, 10], (100,100))
x = odl.phantom.shepp_logan(X)
apart = odl.uniform_partition(0, 2*np.pi, 100)
dpart = odl.uniform_partition(-30, 30, 100)
geometry = odl.tomo.FanBeamGeometry(apart=apart, dpart=dpart, src_radius=15, det_radius=15)
operator = odl.tomo.RayTransform(X, geometry)
pt_op = OperatorModule(operator)
pt_x = torch.from_numpy(x.asarray().reshape(1,1,*x.shape)).cuda()
plt.imshow(pt_op(pt_x).detach().cpu().numpy().squeeze())
from odl.
Hi,
I am using almost the latest pytorch (1.12.1.post201) and I have no such problem with the binding. I imagine that part3_learned_reconstruction_pytorch.ipynb can have some outdated code, however the following code runs as expected:
import matplotlib.pyplot as plt import numpy as np import odl import torch from odl.contrib.torch import OperatorModule
print(torch.version)
X = odl.uniform_discr([-10, -10], [10, 10], (100,100)) x = odl.phantom.shepp_logan(X)
apart = odl.uniform_partition(0, 2*np.pi, 100) dpart = odl.uniform_partition(-30, 30, 100) geometry = odl.tomo.FanBeamGeometry(apart=apart, dpart=dpart, src_radius=15, det_radius=15) operator = odl.tomo.RayTransform(X, geometry) pt_op = OperatorModule(operator) pt_x = torch.from_numpy(x.asarray().reshape(1,1,*x.shape)).cuda()
plt.imshow(pt_op(pt_x).detach().cpu().numpy().squeeze())
I still meet error when use your example.(pytorch==1.10.0,1.8.0)
from odl.
Related Issues (20)
- Proximal of LInfty wrong? HOT 7
- FBP not scaled when PYFFTW_AVAILABLE is True HOT 4
- odl.tomo.backends.skimage_randon.skimage_radon_back_projector not compatible with skimage==0.19
- primal_dual_hybrid_gradient solver: why compute derivative ? HOT 1
- Reconstruct Mayo dataset - errors in importing statements
- odl.operator.operator.OpDomainError: unable to cast tensor to an element of the domain uniform_discr
- question about odl_torch.OperatorModule
- Error with compatibility with latest numpy version HOT 1
- RayTransform: ValueError: The 'astra_cuda' `impl` is not found. HOT 6
- The problem about indexing parallel2Dgeometry HOT 1
- BroadcastOperator doesn't work with scipy > 1.8.1 HOT 4
- AttributeError: module 'numpy' has no attribute 'object' HOT 3
- Python version HOT 2
- Dishing artifact and value shift with FanBeamGeometry
- AttributeError: module 'odl' has no attribute 'Operator'
- Issue with using callback to show intermediate results in iterative solvers HOT 3
- Failing unit tests for product spaces HOT 4
- fanbeamgeometry and conebeamgeometry not found HOT 1
- Handling of redundant values for real CT data
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from odl.