0

enter image description hereso I try to do this macOS tutorial to build an image classifier with tensorflow on a Windows PC, therefore the following prompt doesn't work in the Windows cmd:

IMAGE_SIZE=224
ARCHITECTURE="mobilenet_0.50_${IMAGE_SIZE}"
python -m scripts.retrain \
  --bottleneck_dir=tf_files/bottlenecks \
  --model_dir=tf_files/models/"${ARCHITECTURE}" \
  --summaries_dir=tf_files/training_summaries/"${ARCHITECTURE}" \
  --output_graph=tf_files/retrained_graph.pb \
  --output_labels=tf_files/retrained_labels.txt \
  --architecture="${ARCHITECTURE}" \
  --image_dir=tf_files/YOUR_IMAGE_DIRECTORY_HERE

The tutorial: https://medium.com/@bignikhilreddy/how-to-build-an-insanely-good-image-classifier-in-under-10-minutes-ea3edf411bc8

Hope someone can help me out...

enter image description here

2
  • 1
    If you have GIT installed you should have GIT Bash. Try it in there... Commented Apr 9, 2019 at 12:40
  • Please regard that this site is not a free code translation service, so you have to try it on your own! Come back here with a minimal reproducible example of your attempts when you are facing problems and ask a specific question! Also please take the tour and read How to Ask! Commented Apr 9, 2019 at 17:45

1 Answer 1

2

Set variables first

set IMAGE_SIZE=224
set ARCHITECTURE="mobilenet_0.50_%IMAGE_SIZE%"

Windows uses %VAR% to get the value of a variable, equal to the ${var} in MacOS. Run the command.

python -m scripts.retrain ^
  --bottleneck_dir=tf_files/bottlenecks ^
  --model_dir=tf_files/models/%ARCHITECTURE% ^
  --summaries_dir=tf_files/training_summaries/%ARCHITECTURE% ^
  --output_graph=tf_files/retrained_graph.pb ^
  --output_labels=tf_files/retrained_labels.txt ^
  --architecture=%ARCHITECTURE% ^
  --image_dir=tf_files/YOUR_IMAGE_DIRECTORY_HERE
Sign up to request clarification or add additional context in comments.

8 Comments

The line continuation character for Windows cmd.exe is not REVERSE SOLIDUS (backslash). It is a CIRCUMFLEX ACCENT (caret) (^).
Thanks a lot, this helped me already. But now I get this... i.sstatic.net/cqw3t.png
@tuemerkan - You are using PowerShell and not cmd.exe. Please try with cmd.exe unless that is a requirement.
@tuemerkan please refer to the comment of lit. The answer was edited to reflect it
@KusalHettiarachchi I did, this is the result: i.sstatic.net/6Juqo.png
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.