Python model.sequence_loss_fn() Examples
The following are 9
code examples of model.sequence_loss_fn().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
model
, or try the search function
.
Example #1
Source File: model_test.py From DOTA_models with Apache License 2.0 | 5 votes |
def test_sequence_loss_function_without_label_smoothing(self): model = self.create_model() model.set_mparam('sequence_loss_fn', label_smoothing=0) loss = model.sequence_loss_fn(self.fake_logits, self.fake_labels) with self.test_session() as sess: loss_np = sess.run(loss) # This test checks that the loss function is 'runnable'. self.assertEqual(loss_np.shape, tuple())
Example #2
Source File: model_test.py From yolo_v2 with Apache License 2.0 | 5 votes |
def test_sequence_loss_function_without_label_smoothing(self): model = self.create_model() model.set_mparam('sequence_loss_fn', label_smoothing=0) loss = model.sequence_loss_fn(self.fake_logits, self.fake_labels) with self.test_session() as sess: loss_np = sess.run(loss) # This test checks that the loss function is 'runnable'. self.assertEqual(loss_np.shape, tuple())
Example #3
Source File: model_test.py From Gun-Detector with Apache License 2.0 | 5 votes |
def test_sequence_loss_function_without_label_smoothing(self): model = self.create_model() model.set_mparam('sequence_loss_fn', label_smoothing=0) loss = model.sequence_loss_fn(self.fake_logits, self.fake_labels) with self.test_session() as sess: loss_np = sess.run(loss) # This test checks that the loss function is 'runnable'. self.assertEqual(loss_np.shape, tuple())
Example #4
Source File: model_test.py From hands-detection with MIT License | 5 votes |
def test_sequence_loss_function_without_label_smoothing(self): model = self.create_model() model.set_mparam('sequence_loss_fn', label_smoothing=0) loss = model.sequence_loss_fn(self.fake_logits, self.fake_labels) with self.test_session() as sess: loss_np = sess.run(loss) # This test checks that the loss function is 'runnable'. self.assertEqual(loss_np.shape, tuple())
Example #5
Source File: model_test.py From object_detection_kitti with Apache License 2.0 | 5 votes |
def test_sequence_loss_function_without_label_smoothing(self): model = self.create_model() model.set_mparam('sequence_loss_fn', label_smoothing=0) loss = model.sequence_loss_fn(self.fake_logits, self.fake_labels) with self.test_session() as sess: loss_np = sess.run(loss) # This test checks that the loss function is 'runnable'. self.assertEqual(loss_np.shape, tuple())
Example #6
Source File: model_test.py From object_detection_with_tensorflow with MIT License | 5 votes |
def test_sequence_loss_function_without_label_smoothing(self): model = self.create_model() model.set_mparam('sequence_loss_fn', label_smoothing=0) loss = model.sequence_loss_fn(self.fake_logits, self.fake_labels) with self.test_session() as sess: loss_np = sess.run(loss) # This test checks that the loss function is 'runnable'. self.assertEqual(loss_np.shape, tuple())
Example #7
Source File: model_test.py From g-tensorflow-models with Apache License 2.0 | 5 votes |
def test_sequence_loss_function_without_label_smoothing(self): model = self.create_model() model.set_mparam('sequence_loss_fn', label_smoothing=0) loss = model.sequence_loss_fn(self.fake_logits, self.fake_labels) with self.test_session() as sess: loss_np = sess.run(loss) # This test checks that the loss function is 'runnable'. self.assertEqual(loss_np.shape, tuple())
Example #8
Source File: model_test.py From models with Apache License 2.0 | 5 votes |
def test_sequence_loss_function_without_label_smoothing(self): model = self.create_model() model.set_mparam('sequence_loss_fn', label_smoothing=0) loss = model.sequence_loss_fn(self.fake_logits, self.fake_labels) with self.test_session() as sess: loss_np = sess.run(loss) # This test checks that the loss function is 'runnable'. self.assertEqual(loss_np.shape, tuple())
Example #9
Source File: model_test.py From multilabel-image-classification-tensorflow with MIT License | 5 votes |
def test_sequence_loss_function_without_label_smoothing(self): model = self.create_model() model.set_mparam('sequence_loss_fn', label_smoothing=0) loss = model.sequence_loss_fn(self.fake_logits, self.fake_labels) with self.test_session() as sess: loss_np = sess.run(loss) # This test checks that the loss function is 'runnable'. self.assertEqual(loss_np.shape, tuple())