inference/dimmwitted/test/sampler_test.cc
// test for sample_sgd_single_variable
// the pseudo random number has been precalculated...
test for sample_sgd_single_variable
the pseudo random number has been precalculated
test for sample_sgd_single_variable the pseudo random number has been precalculated
TEST_F(SamplerTest, sample_sgd_single_variable) {
  infrs->assignments_free[cfg->variables[0].id] = 1;
  sampler->set_random_seed(1, 1, 1);
  sampler->sample_sgd_single_variable(0, 0.1);
  EXPECT_EQ(infrs->weight_values[0], 0.2);
  sampler->sample_sgd_single_variable(0, 0.1);
  EXPECT_EQ(infrs->weight_values[0], 0.2);
  sampler->sample_sgd_single_variable(0, 0.1);
  EXPECT_EQ(infrs->weight_values[0], 0.2);
}
TEST_F ( SamplerTest , sample_sgd_single_variable ) { infrs -> assignments_free [ cfg -> variables [ 0 ] . id ] = 1 ; sampler -> set_random_seed ( 1 , 1 , 1 ) ; sampler -> sample_sgd_single_variable ( 0 , 0.1 ) ; EXPECT_EQ ( infrs -> weight_values [ 0 ] , 0.2 ) ; sampler -> sample_sgd_single_variable ( 0 , 0.1 ) ; EXPECT_EQ ( infrs -> weight_values [ 0 ] , 0.2 ) ; sampler -> sample_sgd_single_variable ( 0 , 0.1 ) ; EXPECT_EQ ( infrs -> weight_values [ 0 ] , 0.2 ) ; }
test for sample_sgd_single_variable
the pseudo random number has been precalculated...
test for sample_sgd_single_variable the pseudo random number has been precalculated ...