Home
last modified time | relevance | path

Searched refs:ndim (Results 1 – 25 of 135) sorted by relevance

123456

/external/tensorflow/tensorflow/python/keras/engine/
Dinput_spec.py53 ndim=None, argument
60 self.ndim = len(shape)
62 self.ndim = ndim
70 ('ndim=' + str(self.ndim)) if self.ndim else '',
107 if (spec.ndim is not None or
117 if spec.ndim is not None:
118 ndim = x.shape.ndims
119 if ndim != spec.ndim:
122 'expected ndim=' + str(spec.ndim) + ', found ndim=' +
123 str(ndim) + '. Full shape received: ' +
[all …]
/external/python/cpython3/Objects/
Dmemoryobject.c246 (view->suboffsets && view->suboffsets[dest->ndim-1] >= 0)
251 assert(dest->ndim > 0 && src->ndim > 0); in last_dim_is_contiguous()
254 dest->strides[dest->ndim-1] == dest->itemsize && in last_dim_is_contiguous()
255 src->strides[src->ndim-1] == src->itemsize); in last_dim_is_contiguous()
289 if (dest->ndim != src->ndim) in equiv_shape()
292 for (i = 0; i < dest->ndim; i++) { in equiv_shape()
352 copy_rec(const Py_ssize_t *shape, Py_ssize_t ndim, Py_ssize_t itemsize, in copy_rec() argument
359 assert(ndim >= 1); in copy_rec()
361 if (ndim == 1) { in copy_rec()
373 copy_rec(shape+1, ndim-1, itemsize, in copy_rec()
[all …]
/external/python/cpython3/Modules/
D_testbuffer.c154 base->ndim = 1; in ndbuf_new()
267 if (ndbuf->base.ndim == 0) in init_flags()
473 copy_rec(const Py_ssize_t *shape, Py_ssize_t ndim, Py_ssize_t itemsize, in copy_rec() argument
480 assert(ndim >= 1); in copy_rec()
482 if (ndim == 1) { in copy_rec()
506 copy_rec(shape+1, ndim-1, itemsize, in copy_rec()
520 dest->ndim != src->ndim) in cmp_structure()
523 for (i = 0; i < dest->ndim; i++) { in cmp_structure()
541 assert(dest->ndim > 0); in copy_buffer()
549 if ((dest->suboffsets && dest->suboffsets[dest->ndim-1] >= 0) || in copy_buffer()
[all …]
/external/tensorflow/tensorflow/python/framework/
Dfast_tensor_util.pyx10 tensor_proto, np.ndarray[np.uint16_t, ndim=1] nparray): argument
22 tensor_proto, np.ndarray[np.uint16_t, ndim=1] nparray): argument
30 tensor_proto, np.ndarray[np.float32_t, ndim=1] nparray): argument
38 tensor_proto, np.ndarray[np.float64_t, ndim=1] nparray): argument
46 tensor_proto, np.ndarray[np.int32_t, ndim=1] nparray): argument
53 tensor_proto, np.ndarray[np.uint32_t, ndim=1] nparray): argument
60 tensor_proto, np.ndarray[np.int64_t, ndim=1] nparray): argument
67 tensor_proto, np.ndarray[np.uint64_t, ndim=1] nparray): argument
74 tensor_proto, np.ndarray[np.uint8_t, ndim=1] nparray): argument
82 tensor_proto, np.ndarray[np.uint16_t, ndim=1] nparray): argument
[all …]
/external/tensorflow/tensorflow/python/keras/utils/
Dconv_utils.py28 def convert_data_format(data_format, ndim): argument
30 if ndim == 3:
32 elif ndim == 4:
34 elif ndim == 5:
37 raise ValueError('Input rank not supported:', ndim)
39 if ndim == 3:
41 elif ndim == 4:
43 elif ndim == 5:
46 raise ValueError('Input rank not supported:', ndim)
222 if not 3 <= kernel.ndim <= 5:
[all …]
Dlosses_utils.py224 ndim = K.ndim(losses)
225 weight_ndim = K.ndim(sample_weight)
226 losses = K.mean(losses, axis=list(range(weight_ndim, ndim)))
Dio_utils.py135 def ndim(self): member in HDF5Matrix
141 return self.data.ndim
/external/tensorflow/tensorflow/python/layers/
Dutils.py28 def convert_data_format(data_format, ndim): argument
30 if ndim == 3:
32 elif ndim == 4:
34 elif ndim == 5:
37 raise ValueError('Input rank not supported:', ndim)
39 if ndim == 3:
41 elif ndim == 4:
43 elif ndim == 5:
46 raise ValueError('Input rank not supported:', ndim)
/external/tensorflow/tensorflow/python/keras/
Dactivations_test.py59 x = keras.backend.placeholder(ndim=2)
68 x = keras.backend.placeholder(ndim=1)
80 x = keras.backend.placeholder(ndim=2)
98 x = keras.backend.placeholder(ndim=2)
109 x = keras.backend.placeholder(ndim=2)
125 x = keras.backend.placeholder(ndim=2)
138 x = keras.backend.placeholder(ndim=2)
146 x = keras.backend.placeholder(ndim=2)
158 x = keras.backend.placeholder(ndim=2)
170 x = keras.backend.placeholder(ndim=2)
[all …]
Dactivations.py57 ndim = K.ndim(x)
58 if ndim == 2:
60 elif ndim > 2:
Dbackend.py854 def placeholder(shape=None, ndim=None, dtype=None, sparse=False, name=None): argument
884 if ndim:
885 shape = tuple([None for _ in range(ndim)])
974 def ndim(x): function
1452 if ndim(x) is not None and (ndim(x) > 2 or ndim(y) > 2):
1467 y_permute_dim = list(range(ndim(y)))
1535 x_ndim = ndim(x)
1536 y_ndim = ndim(y)
1552 if ndim(x) == 2 and ndim(y) == 2:
1559 adj_x = None if axes[0] == ndim(x) - 1 else True
[all …]
/external/python/cpython2/Objects/
Dmemoryobject.c11 if (buf->ndim == 0) in get_shape0()
23 if (src->ndim == 1 && src->shape != NULL) { in dup_buffer()
27 if (src->ndim == 1 && src->strides != NULL) { in dup_buffer()
181 if (view->ndim > PY_SSIZE_T_MAX / sizeof(Py_ssize_t)) { in _indirect_copy_nd()
186 indices = (Py_ssize_t *)PyMem_Malloc(sizeof(Py_ssize_t)*view->ndim); in _indirect_copy_nd()
191 for (k=0; k<view->ndim;k++) { in _indirect_copy_nd()
196 for (k=0; k<view->ndim; k++) { in _indirect_copy_nd()
206 func(view->ndim, indices, view->shape); in _indirect_copy_nd()
297 _strided_copy_nd(dest, view->buf, view->ndim, view->shape, in PyMemoryView_GetContiguous()
366 return _IntTupleFromSsizet(self->view.ndim, self->view.shape); in memory_shape_get()
[all …]
Dabstract.c377 if (view->ndim == 0) return 1; in _IsFortranContiguous()
378 if (view->strides == NULL) return (view->ndim == 1); in _IsFortranContiguous()
381 if (view->ndim == 1) return (view->shape[0] == 1 || in _IsFortranContiguous()
383 for (i=0; i<view->ndim; i++) { in _IsFortranContiguous()
398 if (view->ndim == 0) return 1; in _IsCContiguous()
402 if (view->ndim == 1) return (view->shape[0] == 1 || in _IsCContiguous()
404 for (i=view->ndim-1; i>=0; i--) { in _IsCContiguous()
435 for (i = 0; i < view->ndim; i++) { in PyBuffer_GetPointer()
503 indices = (Py_ssize_t *)PyMem_Malloc(sizeof(Py_ssize_t)*(view->ndim)); in PyBuffer_ToContiguous()
508 for (k=0; k<view->ndim;k++) { in PyBuffer_ToContiguous()
[all …]
/external/python/cpython3/Lib/test/
Dtest_buffer.py256 def strides_from_shape(ndim, shape, itemsize, layout): argument
259 if ndim == 0:
263 for i in range(ndim-2, -1, -1):
267 for i in range(1, ndim):
313 def getindex(ndim, ind, strides): argument
316 for i in range(ndim):
325 ndim = len(shape)
326 sstrides = strides_from_shape(ndim, shape, 1, 'C')
327 dstrides = strides_from_shape(ndim, shape[::-1], 1, 'C')
330 fr = getindex(ndim, ind, sstrides)
[all …]
/external/tensorflow/tensorflow/python/keras/layers/
Dmerge.py124 input_ndims = list(map(K.ndim, inputs))
131 x_ndim = K.ndim(x)
141 x_ndim = K.ndim(x)
164 y_ndim = K.ndim(y)
431 elif K.ndim(mask_i) < K.ndim(input_i):
512 axes = [self.axes % K.ndim(x1), self.axes % K.ndim(x2)]
519 axes.append(self.axes[i] % K.ndim(inputs[i]))
Dlocal.py156 self.input_spec = InputSpec(ndim=3)
220 self.input_spec = InputSpec(ndim=3, axes={1: input_dim})
222 self.input_spec = InputSpec(ndim=3, axes={-1: input_dim})
431 self.input_spec = InputSpec(ndim=4)
503 self.input_spec = InputSpec(ndim=4, axes={1: input_filter})
505 self.input_spec = InputSpec(ndim=4, axes={-1: input_filter})
636 ndims = int(mask.ndim / 2)
699 kernel = make_2d(kernel, split_dim=K.ndim(kernel) // 2)
Dconvolutional.py144 self.input_spec = InputSpec(ndim=self.rank + 2)
177 self.input_spec = InputSpec(ndim=self.rank + 2,
754 self.input_spec = InputSpec(ndim=4, axes={channel_axis: input_dim})
832 data_format=conv_utils.convert_data_format(self.data_format, ndim=4))
1028 self.input_spec = InputSpec(ndim=5, axes={channel_axis: input_dim})
1102 data_format=conv_utils.convert_data_format(self.data_format, ndim=5),
1114 data_format=conv_utils.convert_data_format(self.data_format, ndim=4))
1287 self.input_spec = InputSpec(ndim=self.rank + 2,
1504 data_format=conv_utils.convert_data_format(self.data_format, ndim=4))
1510 data_format=conv_utils.convert_data_format(self.data_format, ndim=4))
[all …]
Dpooling.py70 self.input_spec = InputSpec(ndim=3)
234 self.input_spec = InputSpec(ndim=4)
421 self.input_spec = InputSpec(ndim=5)
582 self.input_spec = InputSpec(ndim=3)
691 self.input_spec = InputSpec(ndim=4)
782 self.input_spec = InputSpec(ndim=5)
Dcore.py211 self.input_spec = InputSpec(ndim=3)
268 self.input_spec = InputSpec(ndim=4)
326 self.input_spec = InputSpec(ndim=5)
513 self.input_spec = InputSpec(ndim=len(self.dims) + 1)
571 and K.ndim(inputs) is not None and K.ndim(inputs) > 1):
574 range(2, K.ndim(inputs))])
631 self.input_spec = InputSpec(ndim=2)
/external/tensorflow/tensorflow/contrib/distributions/python/kernel_tests/bijectors/
Daffine_test.py505 if v.ndim < 2:
508 vt = np.swapaxes(v, axis1=v.ndim - 2, axis2=v.ndim - 1)
549 if x.ndim == scale.ndim - 1:
553 if x.ndim == scale.ndim - 1:
558 if x.ndim == scale.ndim - 1:
567 if (ildj.ndim > 0 and (len(scale_args) == 1 or (
571 elif ildj.ndim < scale.ndim - 2:
/external/tensorflow/tensorflow/compiler/xla/service/gpu/
Dcusolver_rewriter.cc58 int ndim = a_shape.dimensions_size(); in CreateCholesky() local
59 CHECK_GE(ndim, 2); in CreateCholesky()
60 int64 n = a_shape.dimensions(ndim - 1); in CreateCholesky()
/external/python/cpython3/Doc/c-api/
Dbuffer.rst156 .. c:member:: int ndim
169 An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim`
171 ``shape[0] * ... * shape[ndim-1] * itemsize`` MUST be equal to
182 An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim`
194 An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim`.
235 :c:member:`~Py_buffer.len`, :c:member:`~Py_buffer.itemsize`, :c:member:`~Py_buffer.ndim`.
348 :c:member:`~Py_buffer.ndim`, :c:member:`~Py_buffer.shape` and :c:member:`~Py_buffer.strides`.
350 If ``ndim == 0``, the memory location pointed to by :c:member:`~Py_buffer.buf` is
368 def verify_structure(memlen, itemsize, ndim, shape, strides, offset):
382 if ndim <= 0:
[all …]
/external/tensorflow/tensorflow/compiler/xla/python_api/
Dxla_shape.py120 layout = range(ndarray.ndim)
124 layout = list(reversed(xrange(ndarray.ndim)))
/external/tensorflow/tensorflow/core/api_def/base_api/
Dapi_def_DynamicPartition.pbtxt17 For each index tuple `js` of size `partitions.ndim`, the slice `data[js, ...]`
24 outputs[i].shape = [sum(partitions == i)] + data.shape[partitions.ndim:]
/external/python/cpython3/Modules/_ctypes/
Dstgdict.c25 self->ndim = 0; in PyCStgDict_init()
60 res += self->ndim * sizeof(Py_ssize_t); in PyCStgDict_sizeof()
101 dst->shape = PyMem_Malloc(sizeof(Py_ssize_t) * src->ndim); in PyCStgDict_clone()
107 sizeof(Py_ssize_t) * src->ndim); in PyCStgDict_clone()
544 dict->ndim, dict->shape, stgdict->format, buf); in PyCStructUnionType_update_stgdict()

123456