diff --git a/tensorflow/src/TensorFlow/Core.hs b/tensorflow/src/TensorFlow/Core.hs new file mode 100644 index 0000000..a7a4ae7 --- /dev/null +++ b/tensorflow/src/TensorFlow/Core.hs @@ -0,0 +1,92 @@ +-- Copyright 2016 TensorFlow authors. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + +{-# LANGUAGE ExplicitNamespaces #-} + +-- | The core functionality of TensorFlow. +-- +-- Unless you are defining ops, you do not need to import other modules from +-- this package. +-- +-- Basic ops are provided in the tensorflow-ops and tensorflow-core-ops +-- packages. +module TensorFlow.Core + ( -- * Session + Session + , SessionOption + , sessionConfig + , sessionTarget + , runSession + , runSessionWithOptions + -- ** Building graphs + , build + , buildAnd + , buildWithSummary + -- ** Running graphs + , Fetchable + , Scalar(..) + , Nodes + , run + , run_ + , Feed + , feed + , runWithFeeds + , runWithFeeds_ + -- ** Async + , asyncProdNodes + + -- * Build + , Build + , BuildT + , render + , asGraphDef + , addGraphDef + + -- * Tensor + , ControlNode + , Tensor + , Value + , Ref + , TensorKind(..) + , tensorAttr + , value + , tensorFromName + -- ** Element types + , TensorData + , TensorType(decodeTensorData, encodeTensorData) + , Shape(..) + , OneOf + , type (/=) + + -- * Op combinators + , colocateWith + , Device(..) + , withDevice + , withNameScope + , named + -- ** Dependencies + , withControlDependencies + , group + -- ** Misc + , identity + , noOp + ) where + +import TensorFlow.Build +import TensorFlow.ControlFlow +import TensorFlow.Nodes +import TensorFlow.Output +import TensorFlow.Session +import TensorFlow.Tensor +import TensorFlow.Types diff --git a/tensorflow/src/TensorFlow/Session.hs b/tensorflow/src/TensorFlow/Session.hs index 39d5b18..ec3f806 100644 --- a/tensorflow/src/TensorFlow/Session.hs +++ b/tensorflow/src/TensorFlow/Session.hs @@ -19,7 +19,6 @@ module TensorFlow.Session ( Session, - -- * Opaque value created via 'sessionConfig' and 'sessionTarget'. SessionOption, sessionConfig, sessionTarget, @@ -76,6 +75,7 @@ runSession :: Session a -> IO a runSession = runSessionWithOptions [] -- | Setting of an option for the session (see 'runSessionWithOptions'). +-- Opaque value created via 'sessionConfig' and 'sessionTarget'. newtype SessionOption = SessionOption { unSesssionOption :: Raw.SessionOptions -> IO () } diff --git a/tensorflow/tensorflow.cabal b/tensorflow/tensorflow.cabal index b7ccdf3..f1ef614 100644 --- a/tensorflow/tensorflow.cabal +++ b/tensorflow/tensorflow.cabal @@ -16,13 +16,14 @@ library exposed-modules: TensorFlow.Build , TensorFlow.BuildOp , TensorFlow.ControlFlow + , TensorFlow.Core , TensorFlow.Internal.FFI + , TensorFlow.Internal.VarInt , TensorFlow.Nodes , TensorFlow.Output , TensorFlow.Session , TensorFlow.Tensor , TensorFlow.Types - , TensorFlow.Internal.VarInt other-modules: TensorFlow.Internal.Raw , TensorFlow.Orphans build-tools: c2hs