| 503 | } |
| 504 | |
| 505 | virtual void InitDiffDataSharedWeightsNet() { |
| 506 | const string& proto = |
| 507 | "name: 'DiffDataSharedWeightsNetwork' " |
| 508 | "layer { " |
| 509 | " name: 'data' " |
| 510 | " type: 'DummyData' " |
| 511 | " dummy_data_param { " |
| 512 | " num: 10 " |
| 513 | " channels: 10 " |
| 514 | " height: 1 " |
| 515 | " width: 1 " |
| 516 | " num: 10 " |
| 517 | " channels: 10 " |
| 518 | " height: 1 " |
| 519 | " width: 1 " |
| 520 | " data_filler { " |
| 521 | " type: 'gaussian' " |
| 522 | " std: 10 " |
| 523 | " } " |
| 524 | " } " |
| 525 | " top: 'data1' " |
| 526 | " top: 'data2' " |
| 527 | "} " |
| 528 | "layer { " |
| 529 | " name: 'innerproduct1' " |
| 530 | " type: 'InnerProduct' " |
| 531 | " inner_product_param { " |
| 532 | " num_output: 10 " |
| 533 | " bias_term: false " |
| 534 | " weight_filler { " |
| 535 | " type: 'constant' " |
| 536 | " value: 0.5 " |
| 537 | " } " |
| 538 | " } " |
| 539 | " param { name: 'sharedweights' } " |
| 540 | " bottom: 'data1' " |
| 541 | " top: 'innerproduct1' " |
| 542 | "} " |
| 543 | "layer { " |
| 544 | " name: 'innerproduct2' " |
| 545 | " type: 'InnerProduct' " |
| 546 | " inner_product_param { " |
| 547 | " num_output: 10 " |
| 548 | " bias_term: false " |
| 549 | " weight_filler { " |
| 550 | " type: 'constant' " |
| 551 | " value: 0.5 " |
| 552 | " } " |
| 553 | " } " |
| 554 | " param { name: 'sharedweights' } " |
| 555 | " bottom: 'innerproduct1' " |
| 556 | " top: 'innerproduct2' " |
| 557 | "} " |
| 558 | "layer { " |
| 559 | " name: 'loss' " |
| 560 | " type: 'EuclideanLoss' " |
| 561 | " bottom: 'data2' " |
| 562 | " bottom: 'innerproduct2' " |