Sunday, 15 December 2019

Windows 10 disable automatic reboot after system update


Try the process below:
1. Press Windows key + R keyboard shortcut to open the Run command.
2. Type the following path and click "OK":
%windir%\System32\Tasks\Microsoft\Windows\UpdateOrchestrator
3. Select the
Reboot ) (it does not have an extension)
file right-click it and select "Rename".
4. Rename the Reboot file to "Reboot.old".
5. Right-click inside the folder, select "New," and click on "Folder".
6. Name the New Folder "Reboot".
7. Now restart your computer.

This will disable Window's ability to restart automatically.

source: https://answers.microsoft.com/en-us/windows/forum/all/disable-windows-10-automatic-restart-after-updates/16f1826d-a796-4de8-ac99-1d625420d265

Saturday, 14 December 2019

Fixing tensorflow path

run this command
set PYTHONPATH=C:\tensorflow1\models
set PYTHONPATH=C:\tensorflow1\models\research
set PYTHONPATH=C:\tensorflow1\models\research\slim
run the following commands from the C:\tensorflow1\models\research directory:
C:\tensorflow1\models\research> python setup.py build
C:\tensorflow1\models\research> python setup.py install


up/downgrade tensorflow


pip show tensorflow
(to check version -- be sure to pay attention to which virtual environment you're in (activate/deactivate))

then use:

pip3 install tensorflow==1.15.0
source: https://stackoverflow.com/questions/58001318/no-attribute-contrib-for-problems


AttributeError: module 'tensorflow' has no attribute 'app'


I am following this tutorial and doing a project on custom object-detection using tensorflow.
So when I tried to create TF record for the train images using the following command
python3 generate_tfrecord.py --csv_input=data/train_labels.csv --output_path=data/train.record
I get the following error:
Traceback (most recent call last):
  File "generate_tfrecord.py", line 23, in <module>
    flags = tf.app.flags
AttributeError: module 'tensorflow' has no attribute 'app'


--

try using import tensorflow.compat.v1 as tf

source: https://stackoverflow.com/questions/58258003/attributeerror-module-tensorflow-has-no-attribute-app