TensorFlow ist eine Open-Source-Python-Bibliothek, die von Google entwickelt wurde, um Modelle für machine learning und neuronale Netzwerke für deep learning zu entwickeln. bessel_i0e() ist eine Funktion, die im Tensorflow-Mathematikmodul vorhanden ist. Diese Funktion wird verwendet, um elementweise exponentiell skalierte modifizierte Bessel-Funktionen 0 Ordnung zu finden.

bessel_i0e (x) = exp (-abs (x)) bessel_i0 (x)
bessel_i0e (x) ist schneller und numerisch stabiler als bessel_i0 (x).

Syntax: tensorflow.math.bessel_i0e (x, name)
 

Parameter:

  •  x: Es ist ein Tensor und die zulässigen d-Typen für diesen Tensor sind bfloat16, half, float32, float64.
  • name: Dies ist ein optionales Argument, mit dem der Operationsname angegeben wird.
     

Rückgabe : Gibt einen Tensor oder einen spärlichen Tensor zurück, abhängig von x desselben Typs wie x.
 

Beispiel 1:



import tensorflow as tf 
  
a = tf.constant([1,2,3,4,5], dtype = tf.float64) 
  
print('a: ',a) 
  
r = tf.math.bessel_i0e(a) 
  
print("Result: ",r) 

Ausgabe:

a: tf.Tensor ([1. 2. 3. 4. 5.], Form = (5,), dtype = float64)
Ergebnis: tf.Tensor ([0.46575961 0.30850832 0.24300035 0.20700192 0.18354081], Form = (5,), dtype = float64)

Beispiel 2: Visualisierung

import tensorflow as tf 
import matplotlib.pyplot as plt  
  
a = tf.constant([1,2,3,4,5], dtype = tf.float64) 
  
r = tf.math.bessel_i0e(a) 
  
plt.plot(a, r, color = 'green', marker = "o")   
plt.title("tensorflow.math.bessel_i0e")   
plt.xlabel("Input")   
plt.ylabel("Result")   
plt.show()  

Ausgabe: