Uploaded image for project: ' Swift for TensorFlow'
  1. Swift for TensorFlow
  2. TF-130

Add API to serialize a @convention(tensorflow) function as a graph

    XMLWordPrintable

    Details

      Description

      Recently we added utilities and attributes to declare TensorFlow functions, for example:
       

      @TensorFlowGraph
      public func innout(_ x: Tensor<Float>) -> Tensor<Float> {
        return x + 1
      }
      
      public func takeTFFunction(_ f: @convention(tensorflow) (Tensor<Float>) -> Tensor<Float>)) {
        ...
      }
      
      takeTFFunction(innout)
      

      This enables compiler-backed APIs for exporting a graph to protobuf files. We can add something like

      public func export<T, U>(_ f: @convention(tensorflow) (T) -> U), to filePath: String) {
        ...
      }
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              xinranmsn Richard Wei
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: