Skip to content

Commit d009690

Browse files
authored
Merge pull request cms-sw#42682 from kpedro88/revertDeepMET
revert DeepMET TensorFlow workaround
2 parents 6bcf8af + 1842a69 commit d009690

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

RecoMET/METPUSubtraction/plugins/DeepMETProducer.cc

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,8 @@ DeepMETProducer::DeepMETProducer(const edm::ParameterSet& cfg, const tensorflow:
4343
session_(cache->getSession()) {
4444
produces<pat::METCollection>();
4545

46-
// Workaround for missing constructor TensorShape::TensorShape(absl::Slice<long>),
47-
// the constructor expects Slice<int64> or initializer_list<int64> and is marked explicit
48-
tensorflow::TensorShape shape;
49-
shape.AddDim(1);
50-
shape.AddDim(max_n_pf_);
51-
shape.AddDim(8);
52-
53-
tensorflow::TensorShape cat_shape;
54-
cat_shape.AddDim(1);
55-
cat_shape.AddDim(max_n_pf_);
56-
cat_shape.AddDim(1);
46+
const tensorflow::TensorShape shape({1, max_n_pf_, 8});
47+
const tensorflow::TensorShape cat_shape({1, max_n_pf_, 1});
5748

5849
input_ = tensorflow::Tensor(tensorflow::DT_FLOAT, shape);
5950
input_cat0_ = tensorflow::Tensor(tensorflow::DT_FLOAT, cat_shape);

0 commit comments

Comments
 (0)