Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inefficient Snapshotting of Shared Parameters #2375

Closed
mhauskn opened this issue Apr 27, 2015 · 1 comment
Closed

Inefficient Snapshotting of Shared Parameters #2375

mhauskn opened this issue Apr 27, 2015 · 1 comment

Comments

@mhauskn
Copy link

mhauskn commented Apr 27, 2015

Shared parameters in Caffe are duplicated when snapshotting a model, resulting in large snapshots containing redundant information.

Example snapshot with shared convolution layers: Identical blob data is written to disk despite shared weight/bias params.

layer {
  name: "conv1_0"
  type: "Convolution"
  bottom: "frames_0"
  top: "conv1_0"
  param {
    name: "conv1_w"
    decay_mult: 1
  }
  param {
    name: "conv1_b"
    decay_mult: 0
  }
  blobs {
    data: -0.012329279
    data: 0.011813422
    data: -1.487906e-05
    data: 0.0090996763
    ...
}

layer {
  name: "conv1_1"
  type: "Convolution"
  bottom: "frames_1"
  top: "conv1_1"
  param {
    name: "conv1_w"
    decay_mult: 1
  }
  param {
    name: "conv1_b"
    decay_mult: 0
  }
  blobs {
    data: -0.012329279
    data: 0.011813422
    data: -1.487906e-05
    data: 0.0090996763
    ...
}
@shelhamer
Copy link
Member

Thanks for the report, but this is a duplicate of #1211 and #2006. This can be fixed by improving the logic for serializing the model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants