Comments (2)
At execution, in the function Advect Scalar, called from advection.py input arguments behave as
Variable
type (grad is computed) whereas intermediate objects in the function are justTensor
type.at::Tensor advectScalar ( float dt, T src, T U, T flags, const std::string method_str, int bnd, const bool sample_outside_fluid, const float maccormack_strength ) { // Size checking done in python side int bsz = flags.size(0); int d = flags.size(2); int h = flags.size(3); int w = flags.size(4); bool is3D = (U.size(1) == 3); src.set_requires_grad(false); U.set_requires_grad(false); flags.set_requires_grad(false); T s_dst = zeros_like(src); T fwd = zeros_like(src); T bwd = zeros_like(src); T fwd_pos = zeros_like(U); T bwd_pos = zeros_like(U); std::cout << "Is variable?" << std::endl; std::cout << src.is_variable() << std::endl; // returns 1, should be 0 std::cout << U.is_variable() << std::endl; // returns 1, should be 0 std::cout << flags.is_variable() << std::endl; // returns 1, should be 0
All should be of
Tensor
type as no backpropagation is required in the advection part.
@beniz Hello! Could you have a look at this, as I am a bit stucked trying to install fluidnet with pytorch 1.0.
from fluidnet_cxx.
Closed a2a49ac
from fluidnet_cxx.
Related Issues (3)
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 fluidnet_cxx.