Summary:
1. Fix BN translator
IntelCaffe and NVCaffe fuse BN+Scale, and the "BatchNorm" op contains 5 params including (scale and bias)
2. Fix Scale translator
the translated outputs of scale have the same names with those of Conv.
All their names are output + '_w' and output + '_b'
Pull Request resolved: https://github.com/pytorch/pytorch/pull/10056
Differential Revision: D10099205
Pulled By: yinghai
fbshipit-source-id: 73a73868e3e16c495e8b233fdb1d373d556a9537
Summary:
- fixed the false newline at the initialization of the crop layer translation which caused the exceptions described in issue #1215
Closes https://github.com/caffe2/caffe2/pull/1746
Differential Revision: D6716228
Pulled By: Yangqing
fbshipit-source-id: dd93b06b3b903f96505d6e6f8e67caeb6981fe66
Summary:
Only works for len(offset) == 1 for now.
Also, Slice Op only supports slicing in one dimension,
can we extend it to support slicing multiple dimensions?
Reviewed By: bwasti
Differential Revision: D5967476
fbshipit-source-id: 6cf9ff510e752ddb3bc9673d47f6a577ae9ccc79
Summary:
To speed up deprecating legacy_pad, we added the option
to remove legacy pad in the caffe_translator
Reviewed By: bddppq
Differential Revision: D5724079
fbshipit-source-id: 25465d26f35bd009aa71667c7c523047de42e802
Summary: The check for old model style seems wrong. Fails with a model I tried to run.
Differential Revision: D4847970
fbshipit-source-id: f28c5bb635c5e8b4dcfcc5c52a434d91a89217e8
Summary: minor fix about C1 model translator
Reviewed By: Yangqing
Differential Revision: D4807165
fbshipit-source-id: 0149e2655d2901b23a37e92f61d9dd678cf6ee69
Summary:
This completes the fix that viswanathgs started in an earlier diff but did not
cover the full Caffe convention. It should have proper guards for all the stuff
that Caffe implies, either supporting it or throwing an explicit exception.
Reviewed By: viswanathgs
Differential Revision: D4751751
fbshipit-source-id: 474e921c33840cff333a631b7b19f881b39ebccd
Summary: The initial implementation wasn't working quite right (no const fill of an empty external input)
Reviewed By: viswanathgs
Differential Revision: D4490569
fbshipit-source-id: 1b2a4f612efb3b2685edfe6c683571dd9d01aa4f
Summary:
Xray is being converted to c2 and ROIPool (needed for detection models) is
missing in c2 trunk. Ported rbgirshick's implementation from experimental with a few
changes:
Also added code for translation in caffe_translate.py
Differential Revision: D4453331
fbshipit-source-id: 7a05a88edec1bd6e806e52dc1e6c55bc75c3149f
Summary: Might be useful to have a command line version of this. Thoughts?
Reviewed By: Yangqing
Differential Revision: D4456221
fbshipit-source-id: 42dd464c5734c0cfbd4c2b1cb348aef9b269b4c2
Summary:
Minor bug in D4426513 - bias is added
as input blob always. Running it on xray throws "RuntimeError: [enforce fail at operator.cc:25] blob
!= nullptr. op Conv: Encountered a non-existing input blob:
caffe.SpatialConvolution_0_b"
Reviewed By: Yangqing
Differential Revision: D4429231
fbshipit-source-id: 0d3905ea6e87128ec1aa9d0f0a2f43126b1069b1
Summary:
Turns out xray models have some independent Scale layers (with bias) besides
the Conv-Scale pairs. We could still fuse it with previous layers with some
work, but for simplicity, including Add op followed by Mul for bias if needed.
We could revisit optimizations layer fusion in the future once we have
something working for xray.
Reviewed By: Yangqing
Differential Revision: D4427266
fbshipit-source-id: ef7d8677ccd7d10dbd20759eeed378d9bc4522d1
Summary: Now that we direct support group convolution, this will no longer be needed. I also took the chance to add dilated convolution and also optional bias.
Reviewed By: prigoyal
Differential Revision: D4426513
fbshipit-source-id: eb2bb0aa619f8ff5f732512570f736bc59cd57dd
Summary: Failing fast instead of swallowing the bias term.
Differential Revision: D4419130
fbshipit-source-id: 98ce0af9a20adecfb027ffe8293ff69910873abc
Summary:
Simple tool similar to caffe_translator_test.py for conversion from caffe to
caffe2. The differences are:
There are a couple of issues that need to be fixed as mentioned in
https://our.intern.facebook.com/intern/tasks?t=15424761, especially related to
the 'legacy_pad' field in conv op.
Differential Revision: D4407146
fbshipit-source-id: ec641f6d7e0cf6cdf2eca21f058b4451635d4a56