Skip to content
Advertisement

Tag: tensorflow

Import onnx models to tensorflow2.x?

I created a modified lenet model using tensorflow that looks like this: When I finish training I save the model using tf.keras.models.save_model : Then I transform this model into onnx format using “tf2onnx” module: I want a method that can retrieve the same model into tensorflow2.x. I tried to use “onnx_tf” to transform the onnx model into tensorflow .pb model:

TensorFlow (any version > 2.5.0) on M1 Mac: No code completion in PyCharm

I am using JetBrain’s PyCharm IDE to work with TensorFlow on a M1 Mac machine. I have installed TensorFlow using the following commands in the given order: For installing Conda, I followed Apple’s official documentation I can import TensorFlow without problems; the version number it prints is 2.8.0. However, I am not getting any code completion suggestions. When typing tensorflow.keras.l,

How to run scipy’s BFGS on GPU

I’d like to run scipy implementation of BFGS optimization algorithm on GPU and scipy seems not to support GPUs. The target function which I want to run on GPU is the following one which is part of the implementation of this repository: I know there is Tensorflow Probablity implementation of BFGS, but I couldn’t find out how I can convert

what does cardinality mean in relation to an image dataset?

After successfully creating a tensorflow image Dataset with: dataset = tf.keras.utils.image_dataset_from_directory(…) which returns Found 21397 files belonging to 5 classes. Using 17118 files for training. There is the cardinality method: dataset.cardinality() which returns a tensor containing the single value tf.Tensor(535, shape=(), dtype=int64) I’ve read the docs here but I don’t understand what 535 represents or why its different to the

Advertisement