0

I am using Jupyter Notebooks on VSCode to create a U-Net. Here is a quick snippet of my code that generates the error:

# PREPARE U-NET MODEL
from tensorflow.keras import Input, Model
from tensorflow.keras.backend import clear_session
from tensorflow.keras.layers import Activation, Add, BatchNormalization, Concatenate, Convolution2DTranspose, MaxPool2D, SeparableConv2D
from tensorflow.math import reduce_mean

With the new update, Pylance is now integrated into Jupyter notebooks. However, it gives me an error saying that tensorflow.math cannot be resolved. I obviously did not explicitly not install the math part in TensorFlow.

The specific error given is Pylance(reportMissingImports).

Mahyar Mirrashed
  • 471
  • 1
  • 3
  • 14

1 Answers1

0

Can you try

from tensorflow._api.v2.math import reduce_mean
Steven-MSFT
  • 7,438
  • 1
  • 5
  • 13