Commit 2ff8bbd1 authored by Akshay Agrawal's avatar Akshay Agrawal Committed by TensorFlower Gardener
Browse files

Support defun-ing instance methods.

This change implements the __get__ method on _PolymorphicFunction and has
it forward the instance to __call__. This makes it possible to write code like

class Foo(object):
  ...

  @tfe.defun
  def two(self, tensor):
    ...

PiperOrigin-RevId: 201365344
parent a056771e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment