-
Notifications
You must be signed in to change notification settings - Fork 220
Description
Please make sure that this is a documentation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:doc_template
System information
- TensorFlow version: 1.0
- Doc Link:
according to this issue #258 using following code to create a high dim tensor
Yes, you need to convert your float array to a
NdArrayusing theStdArraysutilities, before initializing a tensor with it, i.e.TFloat32 t = TFloat32.tensorOf(StdArrays.ndCopyOf(floatImage));
Originally posted by @karllessard in #258
in StdArrays.ndCopyOf method, StdArrays will create a FloatNdArray and copy the origin 3 dim array to the NdArray, then in the TFloat32.tensorOf method, TFloat32 will finally call of(Class<T> type, Shape shape, long size) method and using RawTenor to allocate another memory area.
is this two allocation necessary, and why we need this two allocation?
or do we have any more optimized api to create a tensor with less memory allocation?
Describe the documentation issue
We welcome contributions by users. Will you be able to update submit a PR (use the doc style guide) to fix the doc Issue?