cbfinn / gps

Guided Policy Search
http://rll.berkeley.edu/gps/
Other
593 stars 239 forks source link

Check failed: registry.count(type) == 1 (0 vs. 1) Unknown layer type: Python #100

Closed StrangeTcy closed 6 years ago

StrangeTcy commented 6 years ago

Steps to reproduce the error: 1) Clone this repo; 2) run python python/gps/gps_main.py box2d_pointmass_pigps_example 3) get the following error:

python/gps/gui/textbox.py:64: MatplotlibDeprecationWarning: The set_axis_bgcolor function was deprecated in version 2.0. Use set_facecolor instead.
  self._ax.set_axis_bgcolor(ColorConverter().to_rgba(color, alpha))
python/gps/gui/textbox.py:68: MatplotlibDeprecationWarning: The get_axis_bgcolor function was deprecated in version 2.0. Use get_facecolor instead.
  color, alpha = self._ax.get_axis_bgcolor(), self._ax.get_alpha()
python/gps/gui/textbox.py:69: MatplotlibDeprecationWarning: The set_axis_bgcolor function was deprecated in version 2.0. Use set_facecolor instead.
  self._ax.set_axis_bgcolor(mpl.rcParams['figure.facecolor'])
python/gps/gui/textbox.py:71: MatplotlibDeprecationWarning: The set_axis_bgcolor function was deprecated in version 2.0. Use set_facecolor instead.
  self._ax.set_axis_bgcolor(ColorConverter().to_rgba(color, alpha))
DEBUG:tm._add: /camera/rgb/image_color, sensor_msgs/Image, sub
WARNING: Logging before InitGoogleLogging() is written to STDERR
I1214 19:30:53.622043 21186 solver.cpp:44] Initializing solver from parameters: 
test_iter: 1
test_iter: 1
test_interval: 1000000
base_lr: 0.001
display: 0
lr_policy: "fixed"
momentum: 0.9
weight_decay: 0.005
snapshot_prefix: "python/../experiments/box2d_pointmass_pigps_example/policy"
random_seed: 1
train_net_param {
  layer {
    name: "Python1"
    type: "Python"
    top: "Python1"
    top: "Python2"
    top: "Python3"
    python_param {
      module: "policy_layers"
      layer: "PolicyDataLayer"
      param_str: "{\"shape\": [{\"dim\": [25, 6]}, {\"dim\": [25, 2]}, {\"dim\": [25, 2, 2]}]}"
    }
  }
  layer {
    name: "InnerProduct1"
    type: "InnerProduct"
    bottom: "Python1"
    top: "InnerProduct1"
    inner_product_param {
      num_output: 20
      weight_filler {
        type: "gaussian"
        std: 0.01
      }
      bias_filler {
        type: "constant"
        value: 0
      }
    }
  }
  layer {
    name: "ReLU1"
    type: "ReLU"
    bottom: "InnerProduct1"
    top: "InnerProduct1"
  }
  layer {
    name: "InnerProduct2"
    type: "InnerProduct"
    bottom: "InnerProduct1"
    top: "InnerProduct2"
    inner_product_param {
      num_output: 2
      weight_filler {
        type: "gaussian"
        std: 0.01
      }
      bias_filler {
        type: "constant"
        value: 0
      }
    }
  }
  layer {
    name: "Python4"
    type: "Python"
    bottom: "InnerProduct2"
    bottom: "Python2"
    bottom: "Python3"
    top: "Python4"
    loss_weight: 1
    python_param {
      module: "policy_layers"
      layer: "WeightedEuclideanLoss"
    }
  }
}
test_net_param {
  layer {
    name: "Python1"
    type: "Python"
    top: "Python1"
    python_param {
      module: "policy_layers"
      layer: "PolicyDataLayer"
      param_str: "{\"shape\": [{\"dim\": [1, 6]}]}"
    }
  }
  layer {
    name: "InnerProduct1"
    type: "InnerProduct"
    bottom: "Python1"
    top: "InnerProduct1"
    inner_product_param {
      num_output: 20
      weight_filler {
        type: "gaussian"
        std: 0.01
      }
      bias_filler {
        type: "constant"
        value: 0
      }
    }
  }
  layer {
    name: "ReLU1"
    type: "ReLU"
    bottom: "InnerProduct1"
    top: "InnerProduct1"
  }
  layer {
    name: "InnerProduct2"
    type: "InnerProduct"
    bottom: "InnerProduct1"
    top: "InnerProduct2"
    inner_product_param {
      num_output: 2
      weight_filler {
        type: "gaussian"
        std: 0.01
      }
      bias_filler {
        type: "constant"
        value: 0
      }
    }
  }
}
test_net_param {
  layer {
    name: "DummyData1"
    type: "DummyData"
    top: "DummyData1"
    dummy_data_param {
      shape {
        dim: 1
        dim: 6
      }
    }
  }
  layer {
    name: "InnerProduct1"
    type: "InnerProduct"
    bottom: "DummyData1"
    top: "InnerProduct1"
    inner_product_param {
      num_output: 20
      weight_filler {
        type: "gaussian"
        std: 0.01
      }
      bias_filler {
        type: "constant"
        value: 0
      }
    }
  }
  layer {
    name: "ReLU1"
    type: "ReLU"
    bottom: "InnerProduct1"
    top: "InnerProduct1"
  }
  layer {
    name: "InnerProduct2"
    type: "InnerProduct"
    bottom: "InnerProduct1"
    top: "InnerProduct2"
    inner_product_param {
      num_output: 2
      weight_filler {
        type: "gaussian"
        std: 0.01
      }
      bias_filler {
        type: "constant"
        value: 0
      }
    }
  }
}
type: "Adam"
I1214 19:30:53.622179 21186 solver.cpp:73] Creating training net specified in train_net_param.
I1214 19:30:53.622264 21186 net.cpp:51] Initializing net from parameters: 
state {
  phase: TRAIN
}
layer {
  name: "Python1"
  type: "Python"
  top: "Python1"
  top: "Python2"
  top: "Python3"
  python_param {
    module: "policy_layers"
    layer: "PolicyDataLayer"
    param_str: "{\"shape\": [{\"dim\": [25, 6]}, {\"dim\": [25, 2]}, {\"dim\": [25, 2, 2]}]}"
  }
}
layer {
  name: "InnerProduct1"
  type: "InnerProduct"
  bottom: "Python1"
  top: "InnerProduct1"
  inner_product_param {
    num_output: 20
    weight_filler {
      type: "gaussian"
      std: 0.01
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "ReLU1"
  type: "ReLU"
  bottom: "InnerProduct1"
  top: "InnerProduct1"
}
layer {
  name: "InnerProduct2"
  type: "InnerProduct"
  bottom: "InnerProduct1"
  top: "InnerProduct2"
  inner_product_param {
    num_output: 2
    weight_filler {
      type: "gaussian"
      std: 0.01
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "Python4"
  type: "Python"
  bottom: "InnerProduct2"
  bottom: "Python2"
  bottom: "Python3"
  top: "Python4"
  loss_weight: 1
  python_param {
    module: "policy_layers"
    layer: "WeightedEuclideanLoss"
  }
}
I1214 19:30:53.622318 21186 layer_factory.hpp:77] Creating layer Python1
F1214 19:30:53.622359 21186 layer_factory.hpp:81] Check failed: registry.count(type) == 1 (0 vs. 1) Unknown layer type: Python (known types: AbsVal, Accuracy, ArgMax, BNLL, BatchNorm, BatchReindex, Bias, Concat, ContrastiveLoss, Convolution, Crop, Data, Deconvolution, Dropout, DummyData, ELU, Eltwise, Embed, EuclideanLoss, Exp, Filter, Flatten, HDF5Data, HDF5Output, HingeLoss, Im2col, ImageData, InfogainLoss, InnerProduct, Input, LRN, LSTM, LSTMUnit, Log, MVN, MemoryData, MultinomialLogisticLoss, PReLU, Parameter, Pooling, Power, RNN, ReLU, Reduction, Reshape, SPP, Scale, Sigmoid, SigmoidCrossEntropyLoss, Silence, Slice, Softmax, SoftmaxWithLoss, Split, TanH, Threshold, Tile, WindowData)
*** Check failure stack trace: ***
Aborted (core dumped)

The system used was Ubuntu 16.04 x64, with a pycaffe compiled from source.

StrangeTcy commented 6 years ago

Disregard that; I used a wrong Makefile.config.