File: linreg.prototxt

package info (click to toggle)
caffe 1.0.0~rc4-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 16,284 kB
  • sloc: cpp: 60,050; python: 5,649; makefile: 616; sh: 559
file content (60 lines) | stat: -rw-r--r-- 1,302 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: 'LinearRegressionExample'
# define a simple network for linear regression on dummy data
# that computes the loss by a PythonLayer.
layer {
  type: 'DummyData'
  name: 'x'
  top: 'x'
  dummy_data_param {
    shape: { dim: 10 dim: 3 dim: 2 }
    data_filler: { type: 'gaussian' }
  }
}
layer {
  type: 'DummyData'
  name: 'y'
  top: 'y'
  dummy_data_param {
    shape: { dim: 10 dim: 3 dim: 2 }
    data_filler: { type: 'gaussian' }
  }
}
# include InnerProduct layers for parameters
# so the net will need backward
layer {
  type: 'InnerProduct'
  name: 'ipx'
  top: 'ipx'
  bottom: 'x'
  inner_product_param {
    num_output: 10
    weight_filler { type: 'xavier' }
  }
}
layer {
  type: 'InnerProduct'
  name: 'ipy'
  top: 'ipy'
  bottom: 'y'
  inner_product_param {
    num_output: 10
    weight_filler { type: 'xavier' }
  }
}
layer {
  type: 'Python'
  name: 'loss'
  top: 'loss'
  bottom: 'ipx'
  bottom: 'ipy'
  python_param {
    # the module name -- usually the filename -- that needs to be in $PYTHONPATH
    module: 'pyloss'
    # the layer name -- the class name in the module
    layer: 'EuclideanLossLayer'
  }
  # set loss weight so Caffe knows this is a loss layer.
  # since PythonLayer inherits directly from Layer, this isn't automatically
  # known to Caffe
  loss_weight: 1
}