Oceania2018 6 years ago
parent
commit
53ccd78027
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/TensorFlowNET.Core/Operations/Initializers/VarianceScaling.cs

+ 1
- 1
src/TensorFlowNET.Core/Operations/Initializers/VarianceScaling.cs View File

@@ -84,7 +84,7 @@ namespace Tensorflow.Operations.Initializers
// Assuming convolution kernels (2D, 3D, or more).
// kernel shape: (..., input_depth, depth)
int receptive_field_size = 1;
foreach (var dim in shape.Take(2))
foreach (var dim in shape.Take(shape.Length - 2))
receptive_field_size *= dim;
var fan_in = shape[shape.Length - 2] * receptive_field_size;
var fan_out = shape[shape.Length - 1] * receptive_field_size;


Loading…
Cancel
Save