load tf lazily to speed up load time

This commit is contained in:
Mike J Innes 2016-12-16 15:54:15 +00:00
parent c82716b535
commit ac374087b3

View File

@ -1,5 +1,11 @@
# TODO: load backends lazily
include("tensorflow/tensorflow.jl")
using .TF
export tf
function loadtf()
isdefined(Flux, :TF) && return
@eval include(joinpath(dirname($@__FILE__), "tensorflow/tensorflow.jl"))
end
function tf(args...)
loadtf()
TF.tf(args...)
end