Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/323.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
CNTK C#将输入合并到单个输出_C#_Deep Learning_Actor_Cntk - Fatal编程技术网

CNTK C#将输入合并到单个输出

CNTK C#将输入合并到单个输出,c#,deep-learning,actor,cntk,C#,Deep Learning,Actor,Cntk,我正试图用CNTK C#实现一个演员-评论家模型 花了好几天的时间搜索了一半的互联网,你是我最后的希望:) 我试图将两个输入变量(两个矩阵,每个矩阵的一个维度大小相同)“组合”为一个维度大小为两倍的输出 例如,让我们看看FLULIN代码: var input1 = Variable.InputVariable(new[] { 9 }, DataType.Float, "input1"); var input2 = Variable.InputVariable(new[] { 9 }, DataT

我正试图用CNTK C#实现一个演员-评论家模型

花了好几天的时间搜索了一半的互联网,你是我最后的希望:)

我试图将两个输入变量(两个矩阵,每个矩阵的一个维度大小相同)“组合”为一个维度大小为两倍的输出

例如,让我们看看FLULIN代码:

var input1 = Variable.InputVariable(new[] { 9 }, DataType.Float, "input1");
var input2 = Variable.InputVariable(new[] { 9 }, DataType.Float, "input2");

var combined = Function.Combine(new[] {input1, input2});
// The following throws error
// var combinesVariable = new Variable(combined); 
这会引发异常:

A Function instance 'Composite(Combine): Input('input1', [9], [*, #]), Input('input2', [9], [*, #]) -> Input('input1', [9], [*, #]), Input('input2', [9], [*, #])' with more than one output cannot be implicitly converted to a Variable.
最后,我希望得到一个变量,其中(可能)有两个维度大小的输入[9],一个维度大小的输出[18]

试试看,这将允许您沿所选轴连接变量。我认为,合并是为了从一对函数中创建新函数,这样它们就可以作为一个步骤在图中看到