Optimize imports

Is there any way to optimize imports like:

import tensorflow as tf

tf.keras.layers.Conv2D(...)

to something like:

from tf.keras.layers import Conv2D

Conv2D(...)
1 comment

Hi,

Your second snippet seem to be working. Which further optimization do you have in mind?

Update: I'm disregarding the known code insight issue you've reported (https://intellij-support.jetbrains.com/hc/en-us/community/posts/360003447339-Import-issue-no-auto-completion-under-certain-conditions) for now. What I mean by "working" is that the code does not produce exceptions.

0

Please sign in to leave a comment.