Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
protobuf==3.5.1
pytest-runner
onnx==1.0
onnx==1.1.1
9 changes: 5 additions & 4 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/usr/bin/env bash

# install python dependencies
if [ -f "requirements.txt" ]; then
pip install -r requirements.txt
fi
# install dependencies
apt-get install -y protobuf-compiler libprotoc-dev

pip install -r requirements.txt

if [ $? != 0 ]; then
echo "Install python dependencies failed !!!"
exit 1
Expand Down
13 changes: 13 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (c) 2018 PaddlePaddle Authors. 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.
6 changes: 3 additions & 3 deletions variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
def paddle_variable_to_onnx_tensor(paddle_var_name, block):
# TODO(varunarora): Need to do this only in the case of VarType.LOD_TENSOR.
paddle_var = block.var(paddle_var_name)
return helper.make_tensor_value_info(
paddle_var_name, PADDLE_TO_ONNX_DTYPE[paddle_var.dtype],
paddle_var.shape)
return helper.make_tensor_value_info(paddle_var_name,
PADDLE_TO_ONNX_DTYPE[paddle_var.dtype],
paddle_var.shape)


PADDLE_TO_ONNX_DTYPE = {
Expand Down