From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## Tensorflow Python Node breaks after weights load

Hello everyone,

I'm trying to run python node in LabView, but script return error 1672.

With script everything ok, but LabView have some problems.

Message 1 of 11
(1,910 Views)

## Re: Tensorflow Python Node breaks after weights load

Hello, NoKot333. Do you use any Numpy functions?

Message 2 of 11
(1,863 Views)

## Re: Tensorflow Python Node breaks after weights load

What is your LabVIEW version?

Message 3 of 11
(1,856 Views)

## Re: Tensorflow Python Node breaks after weights load

Message 4 of 11
(1,844 Views)
Solution
Accepted by topic author NoKot333

## Re: Tensorflow Python Node breaks after weights load

@Vazgen_H wrote:

Hello, NoKot333. Do you use any Numpy functions?

I can confirm, I have seen error 1672 when returning a numpy array which is generated by the python script

in the following, I write a 2d buffer to the python node, extract the first column of this 2d buffer, convert this column vector to a numpy array and return as 1d array of doubles "y".

``````import numpy as np
def return_cm(data):

y = data[:, 0]
X = data[:, 1:]

y = np.array(y)
return y``````

the length of the y-vector can be manipulated by choosing a different number of rows, in the following screenshot 1000:

Error 1672 does halt the .vi, when the numbers of rows in this vector is bigger ~ 10.000 , but will work corretly if less e.g. 1000

Message 5 of 11
(1,830 Views)

## Re: Tensorflow Python Node breaks after weights load

There are some Numpy functions, which are not supported by LabVIEW.

Message 6 of 11
(1,810 Views)

## Re: Tensorflow Python Node breaks after weights load

Hello again. Can you send me kwhFinal.h5 for testing code on my PC?

Message 7 of 11
(1,801 Views)

Yes

Message 8 of 11
(1,767 Views)

21.0.1 (64-bit)

Message 9 of 11
(1,766 Views)

Message 10 of 11
(1,764 Views)