Skip to content

Commit

Permalink
Merge pull request pytorch#25 from pytorch/enable_test_gan
Browse files Browse the repository at this point in the history
enable testing gan models
  • Loading branch information
ailzhang authored Jun 7, 2019
2 parents 8e4c280 + b47a388 commit 2e40d4c
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions scripts/run_pytorch.sh
Original file line number Diff line number Diff line change
@@ -5,20 +5,14 @@ conda activate base

ALL_FILE=$(find *.md ! -name README.md)
TEMP_PY="temp.py"
GANs="facebookresearch_pytorch-gan-zoo"

for f in $ALL_FILE
do
echo "Running pytorch example in $f"
# FIXME: GAN models checkpoints are on cuda.
if [[ $f = $GANs* ]]; then
echo "...skipped due to cuda checkpoints."
else
sed -n '/^```python/,/^```/ p' < $f | sed '/^```/ d' > $TEMP_PY
python $TEMP_PY
sed -n '/^```python/,/^```/ p' < $f | sed '/^```/ d' > $TEMP_PY
python $TEMP_PY

if [ -f "$TEMP_PY" ]; then
rm $TEMP_PY
fi
if [ -f "$TEMP_PY" ]; then
rm $TEMP_PY
fi
done

0 comments on commit 2e40d4c

Please sign in to comment.