From 5d4057075c7bcbf5f37d41e963397549a1e3e576 Mon Sep 17 00:00:00 2001 From: Jon Malmaud Date: Mon, 23 Oct 2017 23:41:54 -0400 Subject: [PATCH] Let Session take a graph kw argument --- src/core.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core.jl b/src/core.jl index 76e9b9a1..2d3bb771 100644 --- a/src/core.jl +++ b/src/core.jl @@ -560,14 +560,14 @@ mutable struct Session return this end - function Session(;config=nothing, allow_growth=false) + function Session(;config=nothing, allow_growth=false, graph=get_def_graph()) if config === nothing config = tensorflow.ConfigProto() gpu_config = tensorflow.GPUOptions() set_field!(gpu_config, :allow_growth, allow_growth) set_field!(config, :gpu_options, gpu_config) end - Session(get_def_graph(), config) + Session(graph, config) end end