c6edefdca203a4b58418684295203c3b521cd5bc,opennmt/training.py,Trainer,__init__,#Trainer#Any#Any#Any#,17
Before Change
devices = tf.config.experimental.list_logical_devices(device_type="GPU")
if not devices:
devices = tf.config.experimental.list_logical_devices(device_type="CPU")
devices = [devices[0].name]
self._checkpoint = checkpoint
self._mixed_precision = mixed_precision
self._model = checkpoint.model
self._optimizer = checkpoint.optimizer
After Change
if checkpoint.optimizer is None:
raise ValueError("No optimizer is defined")
if not devices:
devices = misc.get_devices(count=1) // Train with 1 device by default.
self._checkpoint = checkpoint
self._mixed_precision = mixed_precision
self._model = checkpoint.model
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: OpenNMT/OpenNMT-tf
Commit Name: c6edefdca203a4b58418684295203c3b521cd5bc
Time: 2019-11-06
Author: guillaumekln@users.noreply.github.com
File Name: opennmt/training.py
Class Name: Trainer
Method Name: __init__
Project Name: home-assistant/home-assistant
Commit Name: ce9de1b7d235f218fe21549609121af38bcb40c6
Time: 2015-01-19
Author: grompf@gmail.com
File Name: homeassistant/external/wink/pywink.py
Class Name:
Method Name: get_bulbs
Project Name: home-assistant/home-assistant
Commit Name: ce9de1b7d235f218fe21549609121af38bcb40c6
Time: 2015-01-19
Author: grompf@gmail.com
File Name: homeassistant/external/wink/pywink.py
Class Name:
Method Name: get_switches