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
dcuai
dlexamples
Commits
a7666964
Commit
a7666964
authored
Feb 03, 2023
by
qianyj
Browse files
update TensorFlow test code
parent
3f2973d6
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
3 deletions
+7
-3
TensorFlow2x/Accuracy_Validation/ResNet50_Official/README.md
TensorFlow2x/Accuracy_Validation/ResNet50_Official/README.md
+2
-2
TensorFlow2x/Accuracy_Validation/ResNet50_Official/official/vision/image_classification/resnet/resnet_ctl_imagenet_main.py
...n/image_classification/resnet/resnet_ctl_imagenet_main.py
+2
-0
TensorFlow2x/ComputeVision/Classification/README.md
TensorFlow2x/ComputeVision/Classification/README.md
+1
-1
TensorFlow2x/ComputeVision/Classification/models-master/official/vision/image_classification/resnet/resnet_ctl_imagenet_main.py
...n/image_classification/resnet/resnet_ctl_imagenet_main.py
+2
-0
No files found.
TensorFlow2x/Accuracy_Validation/ResNet50_Official/README.md
View file @
a7666964
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
## 运行
## 运行
# sed指令只需要执行一次,添加支持多卡运行的代码
# sed指令只需要执行一次,添加支持多卡运行的代码
sed -i '
99
r configfile' official/vision/image_classification/resnet/resnet_ctl_imagenet_main.py
sed -i '
101
r configfile' official/vision/image_classification/resnet/resnet_ctl_imagenet_main.py
export PYTHONPATH=/path/to/tensorflow/model:$PYTHONPATH
export PYTHONPATH=/path/to/tensorflow/model:$PYTHONPATH
mpirun -np ${num_gpu} --hostfile hostfile -mca btl self,tcp --bind-to none scripts-run/single_process.sh
mpirun -np ${num_gpu} --hostfile hostfile -mca btl self,tcp --bind-to none scripts-run/single_process.sh
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
## 运行
## 运行
# sed指令只需要执行一次,添加支持多卡运行的代码
# sed指令只需要执行一次,添加支持多卡运行的代码
sed -i '
99
r configfile' official/vision/image_classification/resnet/resnet_ctl_imagenet_main.py
sed -i '
101
r configfile' official/vision/image_classification/resnet/resnet_ctl_imagenet_main.py
修改scripts-run/single_process.sh中的--dtype=fp16
修改scripts-run/single_process.sh中的--dtype=fp16
export PYTHONPATH=/path/to/tensorflow/model:$PYTHONPATH
export PYTHONPATH=/path/to/tensorflow/model:$PYTHONPATH
...
...
TensorFlow2x/Accuracy_Validation/ResNet50_Official/official/vision/image_classification/resnet/resnet_ctl_imagenet_main.py
View file @
a7666964
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
import
math
import
math
import
os
import
os
import
json
# Import libraries
# Import libraries
from
absl
import
app
from
absl
import
app
...
@@ -97,6 +98,7 @@ def run(flags_obj):
...
@@ -97,6 +98,7 @@ def run(flags_obj):
Returns:
Returns:
Dictionary of training and eval stats.
Dictionary of training and eval stats.
"""
"""
keras_utils
.
set_session_config
()
keras_utils
.
set_session_config
()
performance
.
set_mixed_precision_policy
(
flags_core
.
get_tf_dtype
(
flags_obj
))
performance
.
set_mixed_precision_policy
(
flags_core
.
get_tf_dtype
(
flags_obj
))
...
...
TensorFlow2x/ComputeVision/Classification/README.md
View file @
a7666964
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
## 分布式多卡
## 分布式多卡
# sed指令只需要执行一次,添加支持多卡运行的代码
# sed指令只需要执行一次,添加支持多卡运行的代码
sed -i '
99
r configfile' models-master/official/vision/image_classification/resnet/resnet_ctl_imagenet_main.py
sed -i '
101
r configfile' models-master/official/vision/image_classification/resnet/resnet_ctl_imagenet_main.py
export PYTHONPATH=/path/to/tensorflow/model:$PYTHONPATH
export PYTHONPATH=/path/to/tensorflow/model:$PYTHONPATH
mpirun -np ${num_gpu} --hostfile hostfile -mca btl self,tcp --bind-to none scripts-run/single_process.sh
mpirun -np ${num_gpu} --hostfile hostfile -mca btl self,tcp --bind-to none scripts-run/single_process.sh
...
...
TensorFlow2x/ComputeVision/Classification/models-master/official/vision/image_classification/resnet/resnet_ctl_imagenet_main.py
View file @
a7666964
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
import
math
import
math
import
os
import
os
import
json
import
json
# Import libraries
# Import libraries
from
absl
import
app
from
absl
import
app
from
absl
import
flags
from
absl
import
flags
...
@@ -97,6 +98,7 @@ def run(flags_obj):
...
@@ -97,6 +98,7 @@ def run(flags_obj):
Returns:
Returns:
Dictionary of training and eval stats.
Dictionary of training and eval stats.
"""
"""
keras_utils
.
set_session_config
()
keras_utils
.
set_session_config
()
performance
.
set_mixed_precision_policy
(
flags_core
.
get_tf_dtype
(
flags_obj
))
performance
.
set_mixed_precision_policy
(
flags_core
.
get_tf_dtype
(
flags_obj
))
...
...
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