Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

No intellisense for tensorflow.nn.max_pool() #285

Open
brettcannon opened this issue Oct 19, 2018 · 5 comments
Open

No intellisense for tensorflow.nn.max_pool() #285

brettcannon opened this issue Oct 19, 2018 · 5 comments

Comments

@brettcannon
Copy link
Member

microsoft/vscode-python#2834

@MikhailArkhipov
Copy link

Jedi

image

LS currently returns list
image

max_pool(input, ksize, strides, padding, data_format="NHWC", name=None)

is not annotated.

_op = _op_def_lib._apply_op_helper(
        "MaxPool", input=input, ksize=ksize, strides=strides, padding=padding,
        data_format=data_format, name=name)
...
_result = quick_execute...
# or
_result = _op.outputs[:]
...
return _result`

so we end up with a list, but we don't recognize the Tensor

@MikhailArkhipov
Copy link

_pywrap_tensorflow_internal is compiled and scraping .pyd did not produce anything with meaningful returns

@lostmsu
Copy link
Contributor

lostmsu commented Nov 24, 2018

@MikhailArkhipov just want to clarify. Does PLS scrap .pyd files? If I have .pyd in my own code, how can I provide type information for it?

@jakebailey
Copy link
Member

Looking at this again to see if the namespace import PR is enough to fix this, and it's not. We're still detecting that it's a list, because the analysis is static (#428) and we infer the tensorflow return as a list because:

    _result = _op.outputs[:]
    # ...
    _result, = _result  # Oops, reassigned. Type doesn't get changed from List[T] to T.
    return _result

@jakebailey
Copy link
Member

jakebailey commented Feb 20, 2019

tensorflow.nn doesn't show up at all anymore with the new LS, so we'll need to look into that. May be related to the numpy issues.

EDIT: No longer the case, it shows up again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants