You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 17, 2026. It is now read-only.
use tensorflow::{Scope,Session,SessionOptions,SessionRunArgs,Variable};fnmain(){letmut s = Scope::new_root_scope();let variable = Variable::builder().const_initial_value([1i64]).build(&mut s).unwrap();let session = Session::new(&SessionOptions::new(),&s.graph_mut()).unwrap();letmut run_args = SessionRunArgs::new();
run_args.add_target(&variable.initializer());
session.run(&mut run_args).unwrap();}
Running this code on my x86 Mac—with libtensorflow 2.15.0 installed via Homebrew, using Tensorflow 0.21.0 as the sole dependency in cargo.toml—leads to a segfault. The same didn't happen on a friend's x86 Linux machine, when she gave the code a test-run there. As far as we can tell, it's the variable that does it; code where no variables are interacting with session.run doesn't seem to have the same issue, on my machine.