Skip to content

Commit

Permalink
Let Session take a graph kw argument
Browse files Browse the repository at this point in the history
  • Loading branch information
malmaud committed Oct 24, 2017
1 parent 441a56a commit 5d40570
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5d40570

Please sign in to comment.