MCPcopy Create free account
hub / github.com/pytorch/pytorch / testFCTransposed

Method testFCTransposed

caffe2/python/layers_test.py:347–366  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

345 train_init_net, train_net = self.get_training_nets()
346
347 def testFCTransposed(self):
348 input_dim = 10
349 output_dim = 30
350 max_length = 20
351 input_record = self.new_record(
352 schema.Struct(
353 ('history_sequence', schema.Scalar((np.float32, (max_length,
354 input_dim)))),
355 )
356 )
357 fc_transposed_out = self.model.FC(
358 input_record.history_sequence, output_dim,
359 axis=2, transposed=True)
360 self.model.output_schema = fc_transposed_out
361 self.assertEqual(
362 schema.Scalar((np.float32, (max_length, output_dim))),
363 fc_transposed_out
364 )
365
366 train_init_net, train_net = self.get_training_nets()
367
368 def testFCTransposedWithMaxFCSize(self):
369 input_dim = 10

Callers

nothing calls this directly

Calls 4

new_recordMethod · 0.80
FCMethod · 0.80
get_training_netsMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected