MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Squeeze

Function Squeeze

tensorflow/go/op/wrappers.go:1251–1268  ·  view source on GitHub ↗

Removes dimensions of size 1 from the shape of a tensor. Given a tensor `input`, this operation returns a tensor of the same type with all dimensions of size 1 removed. If you don't want to remove all size 1 dimensions, you can remove specific size 1 dimensions by specifying `axis`. For example:

(scope *Scope, input tf.Output, optional ...SqueezeAttr)

Source from the content-addressed store, hash-verified

1249// Returns Contains the same data as `input`, but has one or more dimensions of
1250// size 1 removed.
1251func Squeeze(scope *Scope, input tf.Output, optional ...SqueezeAttr) (output tf.Output) {
1252 if scope.Err() != nil {
1253 return
1254 }
1255 attrs := map[string]interface{}{}
1256 for _, a := range optional {
1257 a(attrs)
1258 }
1259 opspec := tf.OpSpec{
1260 Type: "Squeeze",
1261 Input: []tf.Input{
1262 input,
1263 },
1264 Attrs: attrs,
1265 }
1266 op := scope.AddOperation(opspec)
1267 return op.Output(0)
1268}
1269
1270// Inserts a dimension of 1 into a tensor's shape.
1271//

Callers 10

TEST_FFunction · 0.50
TEST_FFunction · 0.50
TEST_FFunction · 0.50
TEST_FFunction · 0.50
ReadTensorFromImageFileFunction · 0.50
WavToSpectrogramFunction · 0.50
TEST_FFunction · 0.50
GetBatchIndicesFunction · 0.50
GatherV2GradFunction · 0.50

Calls 4

aClass · 0.85
ErrMethod · 0.45
AddOperationMethod · 0.45
OutputMethod · 0.45

Tested by 6

TEST_FFunction · 0.40
TEST_FFunction · 0.40
TEST_FFunction · 0.40
TEST_FFunction · 0.40
WavToSpectrogramFunction · 0.40
TEST_FFunction · 0.40