We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
improve code quality using Codacy
<!---
**If you are reporting a bug:**
*  Verify that your issue is not being currently addressed by other issues or pull requests.
*  Please note that Auto-Keras is only compatible with **Python 3.6**.
*  Tag the issue with the `bug report` tag.
-->

### Bug Description
<!---
A clear and concise description of what the bug is.
-->
We are now using Codacy and CodeClimate to improve our code quality.

Please try to solve anything reported by Codacy by following this [link](https://app.codacy.com/manual/jhfjhfj1/autokeras/issues/index).
On the page, you can see a list of **issues**.
You can click to see the details and suggestions to fix the issue.

Thanks.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `autokeras/pretrained/voice_generator/deepvoice3_pytorch/conv.py`
Content:
```
1 # coding: utf-8
2 from torch import nn
3 from torch.nn import functional as F
4 
5 
6 class Conv1d(nn.Conv1d):
7     """Extended nn.Conv1d for incremental dilated convolutions
8     """
9 
10     def __init__(self, *args, **kwargs):
11         super().__init__(*args, **kwargs)
12         self.clear_buffer()
13         self._linearized_weight = None
14 
15     def incremental_forward(self, input):
16 
17         # reshape weight
18         weight = self._get_linearized_weight()
19         kw = self.kernel_size[0]
20         dilation = self.dilation[0]
21 
22         bsz = input.size(0)  # input: bsz x len x dim
23         if kw > 1:
24             input = input.data
25             if self.input_buffer is None:
26                 self.input_buffer = input.new(bsz, kw + (kw - 1) * (dilation - 1), input.size(2))
27                 self.input_buffer.zero_()
28             else:
29                 # shift buffer
30                 self.input_buffer[:, :-1, :] = self.input_buffer[:, 1:, :].clone()
31             # append next input
32             self.input_buffer[:, -1, :] = input[:, -1, :]
33             input = self.input_buffer
34             if dilation > 1:
35                 input = input[:, 0::dilation, :].contiguous()
36         output = F.linear(input.view(bsz, -1), weight, self.bias)
37         return output.view(bsz, 1, -1)
38 
39     def clear_buffer(self):
40         self.input_buffer = None
41 
42     def _get_linearized_weight(self):
43         if self._linearized_weight is None:
44             kw = self.kernel_size[0]
45             # nn.Conv1d
46             weight = self.weight.transpose(1, 2).contiguous()
47 
48             assert weight.size() == (self.out_channels, kw, self.in_channels)
49             self._linearized_weight = weight.view(self.out_channels, -1)
50         return self._linearized_weight
51
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/autokeras/pretrained/voice_generator/deepvoice3_pytorch/conv.py b/autokeras/pretrained/voice_generator/deepvoice3_pytorch/conv.py
--- a/autokeras/pretrained/voice_generator/deepvoice3_pytorch/conv.py
+++ b/autokeras/pretrained/voice_generator/deepvoice3_pytorch/conv.py
@@ -12,29 +12,29 @@
         self.clear_buffer()
         self._linearized_weight = None
 
-    def incremental_forward(self, input):
+    def incremental_forward(self, input_data):
 
         # reshape weight
         weight = self._get_linearized_weight()
         kw = self.kernel_size[0]
         dilation = self.dilation[0]
 
-        bsz = input.size(0)  # input: bsz x len x dim
+        bsz = input_data.size(0)  # conv_input: bsz x len x dim
         if kw > 1:
-            input = input.data
+            input_data = input_data.data
             if self.input_buffer is None:
-                self.input_buffer = input.new(bsz, kw + (kw - 1) * (dilation - 1), input.size(2))
+                self.input_buffer = input_data.new(bsz, kw + (kw - 1) * (dilation - 1), input_data.size(2))
                 self.input_buffer.zero_()
             else:
                 # shift buffer
                 self.input_buffer[:, :-1, :] = self.input_buffer[:, 1:, :].clone()
             # append next input
-            self.input_buffer[:, -1, :] = input[:, -1, :]
-            input = self.input_buffer
+            self.input_buffer[:, -1, :] = input_data[:, -1, :]
+            input_data = self.input_buffer
             if dilation > 1:
-                input = input[:, 0::dilation, :].contiguous()
-        output = F.linear(input.view(bsz, -1), weight, self.bias)
-        return output.view(bsz, 1, -1)
+                input_data = input_data[:, 0::dilation, :].contiguous()
+        input_data = F.linear(input_data.view(bsz, -1), weight, self.bias)
+        return input_data.view(bsz, 1, -1)
 
     def clear_buffer(self):
         self.input_buffer = None

{"golden_diff": "diff --git a/autokeras/pretrained/voice_generator/deepvoice3_pytorch/conv.py b/autokeras/pretrained/voice_generator/deepvoice3_pytorch/conv.py\n--- a/autokeras/pretrained/voice_generator/deepvoice3_pytorch/conv.py\n+++ b/autokeras/pretrained/voice_generator/deepvoice3_pytorch/conv.py\n@@ -12,29 +12,29 @@\n         self.clear_buffer()\n         self._linearized_weight = None\n \n-    def incremental_forward(self, input):\n+    def incremental_forward(self, input_data):\n \n         # reshape weight\n         weight = self._get_linearized_weight()\n         kw = self.kernel_size[0]\n         dilation = self.dilation[0]\n \n-        bsz = input.size(0)  # input: bsz x len x dim\n+        bsz = input_data.size(0)  # conv_input: bsz x len x dim\n         if kw > 1:\n-            input = input.data\n+            input_data = input_data.data\n             if self.input_buffer is None:\n-                self.input_buffer = input.new(bsz, kw + (kw - 1) * (dilation - 1), input.size(2))\n+                self.input_buffer = input_data.new(bsz, kw + (kw - 1) * (dilation - 1), input_data.size(2))\n                 self.input_buffer.zero_()\n             else:\n                 # shift buffer\n                 self.input_buffer[:, :-1, :] = self.input_buffer[:, 1:, :].clone()\n             # append next input\n-            self.input_buffer[:, -1, :] = input[:, -1, :]\n-            input = self.input_buffer\n+            self.input_buffer[:, -1, :] = input_data[:, -1, :]\n+            input_data = self.input_buffer\n             if dilation > 1:\n-                input = input[:, 0::dilation, :].contiguous()\n-        output = F.linear(input.view(bsz, -1), weight, self.bias)\n-        return output.view(bsz, 1, -1)\n+                input_data = input_data[:, 0::dilation, :].contiguous()\n+        input_data = F.linear(input_data.view(bsz, -1), weight, self.bias)\n+        return input_data.view(bsz, 1, -1)\n \n     def clear_buffer(self):\n         self.input_buffer = None\n", "issue": "improve code quality using Codacy\n<!---\r\n**If you are reporting a bug:**\r\n*  Verify that your issue is not being currently addressed by other issues or pull requests.\r\n*  Please note that Auto-Keras is only compatible with **Python 3.6**.\r\n*  Tag the issue with the `bug report` tag.\r\n-->\r\n\r\n### Bug Description\r\n<!---\r\nA clear and concise description of what the bug is.\r\n-->\r\nWe are now using Codacy and CodeClimate to improve our code quality.\r\n\r\nPlease try to solve anything reported by Codacy by following this [link](https://app.codacy.com/manual/jhfjhfj1/autokeras/issues/index).\r\nOn the page, you can see a list of **issues**.\r\nYou can click to see the details and suggestions to fix the issue.\r\n\r\nThanks.\n", "before_files": [{"content": "# coding: utf-8\nfrom torch import nn\nfrom torch.nn import functional as F\n\n\nclass Conv1d(nn.Conv1d):\n    \"\"\"Extended nn.Conv1d for incremental dilated convolutions\n    \"\"\"\n\n    def __init__(self, *args, **kwargs):\n        super().__init__(*args, **kwargs)\n        self.clear_buffer()\n        self._linearized_weight = None\n\n    def incremental_forward(self, input):\n\n        # reshape weight\n        weight = self._get_linearized_weight()\n        kw = self.kernel_size[0]\n        dilation = self.dilation[0]\n\n        bsz = input.size(0)  # input: bsz x len x dim\n        if kw > 1:\n            input = input.data\n            if self.input_buffer is None:\n                self.input_buffer = input.new(bsz, kw + (kw - 1) * (dilation - 1), input.size(2))\n                self.input_buffer.zero_()\n            else:\n                # shift buffer\n                self.input_buffer[:, :-1, :] = self.input_buffer[:, 1:, :].clone()\n            # append next input\n            self.input_buffer[:, -1, :] = input[:, -1, :]\n            input = self.input_buffer\n            if dilation > 1:\n                input = input[:, 0::dilation, :].contiguous()\n        output = F.linear(input.view(bsz, -1), weight, self.bias)\n        return output.view(bsz, 1, -1)\n\n    def clear_buffer(self):\n        self.input_buffer = None\n\n    def _get_linearized_weight(self):\n        if self._linearized_weight is None:\n            kw = self.kernel_size[0]\n            # nn.Conv1d\n            weight = self.weight.transpose(1, 2).contiguous()\n\n            assert weight.size() == (self.out_channels, kw, self.in_channels)\n            self._linearized_weight = weight.view(self.out_channels, -1)\n        return self._linearized_weight\n", "path": "autokeras/pretrained/voice_generator/deepvoice3_pytorch/conv.py"}], "after_files": [{"content": "# coding: utf-8\nfrom torch import nn\nfrom torch.nn import functional as F\n\n\nclass Conv1d(nn.Conv1d):\n    \"\"\"Extended nn.Conv1d for incremental dilated convolutions\n    \"\"\"\n\n    def __init__(self, *args, **kwargs):\n        super().__init__(*args, **kwargs)\n        self.clear_buffer()\n        self._linearized_weight = None\n\n    def incremental_forward(self, input_data):\n\n        # reshape weight\n        weight = self._get_linearized_weight()\n        kw = self.kernel_size[0]\n        dilation = self.dilation[0]\n\n        bsz = input_data.size(0)  # conv_input: bsz x len x dim\n        if kw > 1:\n            input_data = input_data.data\n            if self.input_buffer is None:\n                self.input_buffer = input_data.new(bsz, kw + (kw - 1) * (dilation - 1), input_data.size(2))\n                self.input_buffer.zero_()\n            else:\n                # shift buffer\n                self.input_buffer[:, :-1, :] = self.input_buffer[:, 1:, :].clone()\n            # append next input\n            self.input_buffer[:, -1, :] = input_data[:, -1, :]\n            input_data = self.input_buffer\n            if dilation > 1:\n                input_data = input_data[:, 0::dilation, :].contiguous()\n        input_data = F.linear(input_data.view(bsz, -1), weight, self.bias)\n        return input_data.view(bsz, 1, -1)\n\n    def clear_buffer(self):\n        self.input_buffer = None\n\n    def _get_linearized_weight(self):\n        if self._linearized_weight is None:\n            kw = self.kernel_size[0]\n            # nn.Conv1d\n            weight = self.weight.transpose(1, 2).contiguous()\n\n            assert weight.size() == (self.out_channels, kw, self.in_channels)\n            self._linearized_weight = weight.view(self.out_channels, -1)\n        return self._linearized_weight\n", "path": "autokeras/pretrained/voice_generator/deepvoice3_pytorch/conv.py"}]}