You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the TF1.x use the "org.tensorflow.Tensor#create(java.lang.Object)" can conveniently construct various types.
Which method in TF2 is equivalent to org.tensorflow.Tensor#create(java.lang.Object) in TF1?
The text was updated successfully, but these errors were encountered:
In fact, if you are looking at creating TF Tensors, you should use factory methods of classes part of the TType family. For example, to create a integer scalar, you should call TInt32.scalarOf(value) and so on.
TF tensors are ndArrays, but not necessarily the other way around, meaning that if you create tensors only using the java-ndarray library (e.g. NdArrays.scalarOf(integer), you'll get a n-dimensional data structure, yes, but you won't be able to use it directly with TensorFlow and you'll need to convert to a TF Tensor later (e.g. TInt32.tensorOf(ndArray)).
In the TF1.x use the "org.tensorflow.Tensor#create(java.lang.Object)" can conveniently construct various types.
Which method in TF2 is equivalent to org.tensorflow.Tensor#create(java.lang.Object) in TF1?
The text was updated successfully, but these errors were encountered: