Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/80.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将向量添加到R中的数组_R_Arrays_Tensorflow_Matrix_Vector - Fatal编程技术网

将向量添加到R中的数组

将向量添加到R中的数组,r,arrays,tensorflow,matrix,vector,R,Arrays,Tensorflow,Matrix,Vector,我有一个数组 width.ndvi <- 51 height.ndvi <- 51 totalframes <- 4464 ndvi.array <- array(0, dim = c(height.ndvi, width.ndvi, totalframes)) width.ndvi只需执行array(rep(ndv.array,length(channel))、c(dim(ndvi.array),length(channel))您似乎在混合值和维度。从尺寸为51x51

我有一个数组

width.ndvi <- 51
height.ndvi <- 51
totalframes <- 4464
ndvi.array <- array(0, dim = c(height.ndvi, width.ndvi, totalframes))

width.ndvi只需执行
array(rep(ndv.array,length(channel))、c(dim(ndvi.array),length(channel))
您似乎在混合值和维度。从尺寸为51x51x4464的阵列开始。这与51x51x4464x1相等。(正如二维2x3矩阵可以被视为三维2x3x1阵列)。您想要的结果尺寸是多少?我想我需要51x51x4464x1。这是tensorflow keras的输入,其中需要指定通道尺寸。感谢Onyanbu,我不需要4464长度向量,只需要单个值1,而是通过设置
通道