<h2 dir="auto">Issue description</h2>
<p dir="auto">Implement derivative for <code class="notranslate">torch.eig(a, eigenvectors=True)</code>.</p>
<h2 dir="auto">Code example</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import torch
a = torch.tensor(1., requires_grad=True)
(a * torch.eye(3)).eig(eigenvectors=True)[1].sum().backward()"><pre class="notranslate"><code class="notranslate">import torch
a = torch.tensor(1., requires_grad=True)
(a * torch.eye(3)).eig(eigenvectors=True)[1].sum().backward()
</code></pre></div>
<p dir="auto">yields</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="RuntimeError: the derivative for 'eig' is not implemented"><pre class="notranslate"><code class="notranslate">RuntimeError: the derivative for 'eig' is not implemented
</code></pre></div>
<h2 dir="auto">System Info</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ python collect_env.py
Collecting environment information...
PyTorch version: 0.4.1
Is debug build: No
CUDA used to build PyTorch: Could not collect

OS: Mac OSX 10.13.6
GCC version: Could not collect
CMake version: version 3.12.0

Python version: 3.6
Is CUDA available: No
CUDA runtime version: 9.2.148
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect

Versions of relevant libraries:
[pip] Could not collect
[conda] torch                     0.4.1                     &lt;pip&gt;
[conda] torchvision               0.2.1                     &lt;pip&gt;
$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.1.0 (clang-902.0.39.2)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
$ pip --version
pip 18.0 from /anaconda3/lib/python3.6/site-packages/pip (python 3.6)"><pre class="notranslate"><code class="notranslate">$ python collect_env.py
Collecting environment information...
PyTorch version: 0.4.1
Is debug build: No
CUDA used to build PyTorch: Could not collect

OS: Mac OSX 10.13.6
GCC version: Could not collect
CMake version: version 3.12.0

Python version: 3.6
Is CUDA available: No
CUDA runtime version: 9.2.148
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect

Versions of relevant libraries:
[pip] Could not collect
[conda] torch                     0.4.1                     &lt;pip&gt;
[conda] torchvision               0.2.1                     &lt;pip&gt;
$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.1.0 (clang-902.0.39.2)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
$ pip --version
pip 18.0 from /anaconda3/lib/python3.6/site-packages/pip (python 3.6)
</code></pre></div>
<p dir="auto">It seems that the derivative for 'eig' is not implemented in torch 0.3.1 .post2.<br>
How could I use the derivate for 'eig'?</p>