Elementwise calcola l'AND bit per bit di "x" e "y".
Il risultato avrà quei bit impostati, che sono impostati sia in "x" che in "y". Il calcolo viene eseguito sulle rappresentazioni sottostanti di "x" e "y".
Per esempio:
import tensorflow as tf
from tensorflow.python.ops import bitwise_ops
dtype_list = [tf.int8, tf.int16, tf.int32, tf.int64,
tf.uint8, tf.uint16, tf.uint32, tf.uint64]
for dtype in dtype_list:
lhs = tf.constant([0, 5, 3, 14], dtype=dtype)
rhs = tf.constant([5, 0, 7, 11], dtype=dtype)
exp = tf.constant([0, 0, 3, 10], dtype=tf.float32)
res = bitwise_ops.bitwise_and(lhs, rhs)
tf.assert_equal(tf.cast(res, tf.float32), exp) # TRUE
Costanti
Corda | OP_NAME | Il nome di questa operazione, come noto al motore principale di TensorFlow |
Metodi pubblici
Uscita <T> | comeuscita () Restituisce l'handle simbolico del tensore. |
statico <T estende TNumero > BitwiseAnd <T> | |
Uscita <T> | z () |
Metodi ereditati
booleano finale | è uguale a (Oggetto oggetto) |
finale int | codicehash () |
Operazione | |
stringa finale | aStringa () |
booleano | è uguale a (Oggetto arg0) |
Classe finale<?> | getClass () |
int | codicehash () |
vuoto finale | avvisare () |
vuoto finale | notificaTutti () |
Corda | aStringa () |
vuoto finale | attendere (lungo arg0, int arg1) |
vuoto finale | aspetta (lungo arg0) |
vuoto finale | Aspettare () |
ambiente di esecuzione astratto | ambiente () Restituisce l'ambiente di esecuzione in cui è stata creata questa operazione. |
Operazione astratta |
risultato astratto <T> | comeuscita () Restituisce l'handle simbolico del tensore. |
astratto T | come tensore () Restituisce il tensore in questo operando. |
forma astratta | |
Classe astratta<T> | tipo () Restituisce il tipo tensore di questo operando |
Costanti
Stringa finale statica pubblica OP_NAME
Il nome di questa operazione, come noto al motore principale di TensorFlow
Metodi pubblici
Uscita pubblica <T> asOutput ()
Restituisce l'handle simbolico del tensore.
Gli input per le operazioni TensorFlow sono output di un'altra operazione TensorFlow. Questo metodo viene utilizzato per ottenere un handle simbolico che rappresenta il calcolo dell'input.
public static BitwiseAnd <T> create ( ambito ambito , operando <T> x, operando <T> y)
Metodo factory per creare una classe che racchiude una nuova operazione BitwiseAnd.
Parametri
portata | ambito attuale |
---|
Ritorni
- una nuova istanza di BitwiseAnd