是否可以定义具有多个输入的TensorFlow图?例如,我想给图形两个图像和一个文本,每个图像由一堆图层处理,最后有一个fc图层.然后有一个节点计算有损函数,该函数考虑了三个表示.目的是考虑到联合代表性的损失,让三个网络反向传播.可能吗?有关它的任何示例/教程?提前致谢!
看下面的代码
Blue = channel[0];
Green = channel[1];
Red = channel[2];
Mat G = (Green + Blue) / 2;
Run Code Online (Sandbox Code Playgroud)
其中红绿蓝是图像的通道.绿色和蓝色的总和是奇数,有时会形成一个圆形,有时是"修复".例如,对于值为120和蓝色45的绿色像素,G值为82(因此它只需要82.5的整数部分).而在另一种情况下,绿色是106而蓝色是33,我得到G的那个元素的值70(因此,它是圆的,因为(33 + 106)/ 2 = 69,5).
这是什么操作?
从OpenCV文档:
C++:void SIFT::operator()(InputArray img, InputArray mask, vector<KeyPoint>& keypoints,
OutputArray descriptors, bool useProvidedKeypoints=false)
Run Code Online (Sandbox Code Playgroud)
参数:
img – Input 8-bit grayscale image
mask – Optional input mask that marks the regions where we should detect features.
keypoints – The input/output vector of keypoints
descriptors – The output matrix of descriptors. Pass cv::noArray()
if you do not need them.
useProvidedKeypoints – Boolean flag. If it is true, the keypoint
detector is not run. Instead, the provided vector of keypoints is
used and the algorithm …Run Code Online (Sandbox Code Playgroud)