Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
ea3fa4a3
"vscode:/vscode.git/clone" did not exist on "dd408ee4815ce505d48f1f590058aab41a856aaf"
Commit
ea3fa4a3
authored
Mar 22, 2017
by
Ivan Bogatyy
Browse files
Update DRAGNN, fix some macOS issues
parent
b7523ee5
Changes
115
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
294 additions
and
6 deletions
+294
-6
syntaxnet/dragnn/core/compute_session.h
syntaxnet/dragnn/core/compute_session.h
+15
-0
syntaxnet/dragnn/core/compute_session_impl.cc
syntaxnet/dragnn/core/compute_session_impl.cc
+15
-0
syntaxnet/dragnn/core/compute_session_impl.h
syntaxnet/dragnn/core/compute_session_impl.h
+15
-0
syntaxnet/dragnn/core/compute_session_impl_test.cc
syntaxnet/dragnn/core/compute_session_impl_test.cc
+15
-0
syntaxnet/dragnn/core/compute_session_pool.cc
syntaxnet/dragnn/core/compute_session_pool.cc
+15
-0
syntaxnet/dragnn/core/compute_session_pool.h
syntaxnet/dragnn/core/compute_session_pool.h
+15
-0
syntaxnet/dragnn/core/compute_session_pool_test.cc
syntaxnet/dragnn/core/compute_session_pool_test.cc
+15
-0
syntaxnet/dragnn/core/index_translator.cc
syntaxnet/dragnn/core/index_translator.cc
+15
-0
syntaxnet/dragnn/core/index_translator.h
syntaxnet/dragnn/core/index_translator.h
+15
-0
syntaxnet/dragnn/core/index_translator_test.cc
syntaxnet/dragnn/core/index_translator_test.cc
+15
-0
syntaxnet/dragnn/core/input_batch_cache.h
syntaxnet/dragnn/core/input_batch_cache.h
+20
-5
syntaxnet/dragnn/core/input_batch_cache_test.cc
syntaxnet/dragnn/core/input_batch_cache_test.cc
+15
-0
syntaxnet/dragnn/core/interfaces/BUILD
syntaxnet/dragnn/core/interfaces/BUILD
+4
-1
syntaxnet/dragnn/core/interfaces/cloneable_transition_state.h
...axnet/dragnn/core/interfaces/cloneable_transition_state.h
+15
-0
syntaxnet/dragnn/core/interfaces/component.h
syntaxnet/dragnn/core/interfaces/component.h
+15
-0
syntaxnet/dragnn/core/interfaces/input_batch.h
syntaxnet/dragnn/core/interfaces/input_batch.h
+15
-0
syntaxnet/dragnn/core/interfaces/transition_state.h
syntaxnet/dragnn/core/interfaces/transition_state.h
+15
-0
syntaxnet/dragnn/core/interfaces/transition_state_starter_test.cc
...t/dragnn/core/interfaces/transition_state_starter_test.cc
+15
-0
syntaxnet/dragnn/core/ops/compute_session_op.cc
syntaxnet/dragnn/core/ops/compute_session_op.cc
+15
-0
syntaxnet/dragnn/core/ops/compute_session_op.h
syntaxnet/dragnn/core/ops/compute_session_op.h
+15
-0
No files found.
syntaxnet/dragnn/core/compute_session.h
View file @
ea3fa4a3
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// =============================================================================
#ifndef NLP_SAFT_OPENSOURCE_DRAGNN_CORE_COMPUTE_SESSION_H_
#define NLP_SAFT_OPENSOURCE_DRAGNN_CORE_COMPUTE_SESSION_H_
...
...
syntaxnet/dragnn/core/compute_session_impl.cc
View file @
ea3fa4a3
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// =============================================================================
#include "dragnn/core/compute_session_impl.h"
#include <algorithm>
...
...
syntaxnet/dragnn/core/compute_session_impl.h
View file @
ea3fa4a3
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// =============================================================================
#ifndef NLP_SAFT_OPENSOURCE_DRAGNN_CORE_COMPUTE_SESSION_IMPL_H_
#define NLP_SAFT_OPENSOURCE_DRAGNN_CORE_COMPUTE_SESSION_IMPL_H_
...
...
syntaxnet/dragnn/core/compute_session_impl_test.cc
View file @
ea3fa4a3
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// =============================================================================
#include "dragnn/core/compute_session_impl.h"
#include <memory>
...
...
syntaxnet/dragnn/core/compute_session_pool.cc
View file @
ea3fa4a3
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// =============================================================================
#include "dragnn/core/compute_session_pool.h"
#include <utility>
...
...
syntaxnet/dragnn/core/compute_session_pool.h
View file @
ea3fa4a3
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// =============================================================================
#ifndef NLP_SAFT_OPENSOURCE_DRAGNN_CORE_COMPUTE_SESSION_POOL_H_
#define NLP_SAFT_OPENSOURCE_DRAGNN_CORE_COMPUTE_SESSION_POOL_H_
...
...
syntaxnet/dragnn/core/compute_session_pool_test.cc
View file @
ea3fa4a3
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// =============================================================================
#include "dragnn/core/compute_session_pool.h"
#include <memory>
...
...
syntaxnet/dragnn/core/index_translator.cc
View file @
ea3fa4a3
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// =============================================================================
#include "dragnn/core/index_translator.h"
#include "tensorflow/core/platform/logging.h"
...
...
syntaxnet/dragnn/core/index_translator.h
View file @
ea3fa4a3
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// =============================================================================
#ifndef NLP_SAFT_OPENSOURCE_DRAGNN_CORE_INDEX_TRANSLATOR_H_
#define NLP_SAFT_OPENSOURCE_DRAGNN_CORE_INDEX_TRANSLATOR_H_
...
...
syntaxnet/dragnn/core/index_translator_test.cc
View file @
ea3fa4a3
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// =============================================================================
#include "dragnn/core/index_translator.h"
#include "dragnn/core/test/mock_component.h"
...
...
syntaxnet/dragnn/core/input_batch_cache.h
View file @
ea3fa4a3
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// =============================================================================
#ifndef NLP_SAFT_OPENSOURCE_DRAGNN_CORE_INPUT_BATCH_CACHE_H_
#define NLP_SAFT_OPENSOURCE_DRAGNN_CORE_INPUT_BATCH_CACHE_H_
...
...
@@ -16,14 +31,14 @@ namespace dragnn {
class
InputBatchCache
{
public:
// Create an empty cache.
.
// Create
s
an empty cache.
InputBatchCache
()
:
stored_type_
(
std
::
type_index
(
typeid
(
void
)))
{}
// Create a InputBatchCache from a single example. This copies the string.
// Create
s
a InputBatchCache from a single example. This copies the string.
explicit
InputBatchCache
(
const
string
&
data
)
:
stored_type_
(
std
::
type_index
(
typeid
(
void
))),
source_data_
({
data
})
{}
// Create a InputBatchCache from a vector of examples. The vector is copied.
// Create
s
a InputBatchCache from a vector of examples. The vector is copied.
explicit
InputBatchCache
(
const
std
::
vector
<
string
>
&
data
)
:
stored_type_
(
std
::
type_index
(
typeid
(
void
))),
source_data_
(
data
)
{}
...
...
@@ -36,7 +51,7 @@ class InputBatchCache {
source_data_
.
emplace_back
(
data
);
}
// Convert the stored strings into protos and return them in a specific
// Convert
s
the stored strings into protos and return them in a specific
// InputBatch subclass. T should always be of type InputBatch. After this
// method is called once, all further calls must be of the same data type.
template
<
class
T
>
...
...
@@ -54,7 +69,7 @@ class InputBatchCache {
return
dynamic_cast
<
T
*>
(
converted_data_
.
get
());
}
// Return the serialized representation of the data held in the input batch
// Return
s
the serialized representation of the data held in the input batch
// object within this cache.
const
std
::
vector
<
string
>
SerializedData
()
const
{
CHECK
(
converted_data_
)
<<
"Cannot return batch without data."
;
...
...
syntaxnet/dragnn/core/input_batch_cache_test.cc
View file @
ea3fa4a3
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// =============================================================================
#include "dragnn/core/input_batch_cache.h"
#include "dragnn/core/interfaces/input_batch.h"
...
...
syntaxnet/dragnn/core/interfaces/BUILD
View file @
ea3fa4a3
package
(
default_visibility
=
[
"//visibility:public"
])
package
(
default_visibility
=
[
"//visibility:public"
],
features
=
[
"-layering_check"
],
)
cc_library
(
name
=
"cloneable_transition_state"
,
...
...
syntaxnet/dragnn/core/interfaces/cloneable_transition_state.h
View file @
ea3fa4a3
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// =============================================================================
#ifndef NLP_SAFT_OPENSOURCE_DRAGNN_CORE_INTERFACES_CLONEABLE_TRANSITION_STATE_H_
#define NLP_SAFT_OPENSOURCE_DRAGNN_CORE_INTERFACES_CLONEABLE_TRANSITION_STATE_H_
...
...
syntaxnet/dragnn/core/interfaces/component.h
View file @
ea3fa4a3
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// =============================================================================
#ifndef NLP_SAFT_OPENSOURCE_DRAGNN_CORE_INTERFACES_COMPONENT_H_
#define NLP_SAFT_OPENSOURCE_DRAGNN_CORE_INTERFACES_COMPONENT_H_
...
...
syntaxnet/dragnn/core/interfaces/input_batch.h
View file @
ea3fa4a3
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// =============================================================================
#ifndef NLP_SAFT_OPENSOURCE_DRAGNN_CORE_INTERFACES_INPUT_BATCH_H_
#define NLP_SAFT_OPENSOURCE_DRAGNN_CORE_INTERFACES_INPUT_BATCH_H_
...
...
syntaxnet/dragnn/core/interfaces/transition_state.h
View file @
ea3fa4a3
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// =============================================================================
#ifndef NLP_SAFT_OPENSOURCE_DRAGNN_CORE_INTERFACES_TRANSITION_STATE_H_
#define NLP_SAFT_OPENSOURCE_DRAGNN_CORE_INTERFACES_TRANSITION_STATE_H_
...
...
syntaxnet/dragnn/core/interfaces/transition_state_starter_test.cc
View file @
ea3fa4a3
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// =============================================================================
#include "dragnn/core/test/mock_transition_state.h"
#include <gmock/gmock.h>
#include "testing/base/public/googletest.h"
...
...
syntaxnet/dragnn/core/ops/compute_session_op.cc
View file @
ea3fa4a3
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// =============================================================================
#include "dragnn/core/ops/compute_session_op.h"
#include "dragnn/core/compute_session.h"
...
...
syntaxnet/dragnn/core/ops/compute_session_op.h
View file @
ea3fa4a3
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// =============================================================================
#ifndef NLP_SAFT_OPENSOURCE_DRAGNN_CORE_OPS_COMPUTE_SESSION_OP_H_
#define NLP_SAFT_OPENSOURCE_DRAGNN_CORE_OPS_COMPUTE_SESSION_OP_H_
...
...
Prev
1
2
3
4
5
6
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment