DeepLabCut / DeepLabCut-core

Headless DeepLabCut (no GUI support)
http://deeplabcut.org
GNU Lesser General Public License v3.0
30 stars 17 forks source link

migration to TF 2.2+ #9

Closed MMathisLab closed 3 years ago

MMathisLab commented 3 years ago

This PR is updates to make core DLC functions (train_network, evalute_network, analyze_videos, analyze_time_lapse_videos, model export) compatible with TF 2.2+.

Note, this is a backwards breaking change. It would require users to install tensorflow 2.2+ (which is now a super simplified pip install tensorflow (no gpu vs cpu issues).

Also thanks to @altear for testing and PR to this branch as well.

This closes #6

MMathisLab commented 3 years ago

I would like to merge this into DLC-core; the limitation is model-export, but otherwise ALL core functions are included.

MMathisLab commented 3 years ago

only unresolved warnings testing on colab are:


WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tf_slim/layers/layers.py:1089: Layer.apply (from tensorflow.python.keras.engine.base_layer_v1) is deprecated and will be removed in a future version.
Instructions for updating:
Please use `layer.__call__` method instead.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/deeplabcutcore/pose_estimation_tensorflow/nnet/losses.py:38: to_float (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.cast` instead.
Loading ImageNet-pretrained resnet_50