Tensorpack is in development, and API changes can happen. The backward compatibilty will be preserved for at least several months, with a deprecation warning, so you don't need to look at here very often.
Here are a list of things that were changed, starting from an early version. TensorFlow itself also changes API and those are not listed here.
- 2019/03/20.
The concept of
InputDesc
was replaced by its equivalent in TF:tf.TensorSpec
. This may be a breaking change if you have customized code that relies on internals ofInputDesc
. To usetf.TensorSpec
in yourModelDesc
:
def inputs(self):
return [tf.TensorSpec((None, 28, 28, 1), tf.float32, 'image'),
tf.TensorSpec((None,), tf.int32, 'label')]
- [2018/08/27] msgpack is used for "serialization to disk", because pyarrow
has no compatibility between versions. To use pyarrow instead,
export TENSORPACK_COMPATIBLE_SERIALIZE=pyarrow
. - [2018/04/05]
msgpack is replaced by pyarrow in favor of its speed. If you want old behavior,It's later found that pyarrow is unstable and may lead to crash. So the default serialization is changed back to msgpack.export TENSORPACK_SERIALIZE=msgpack
. - [2018/03/20]
ModelDesc
starts to use simplified interfaces:_get_inputs()
renamed toinputs()
and returnstf.TensorSpec
.build_graph(self, tensor1, tensor2)
returns the cost tensor directly._get_optimizer()
renamed tooptimizer()
. Old interface will still be available for a while, but new ones are recommended.
- [2018/03/12]
JSONWriter
use a different file name, and will not automatically restore epoch number.AutoResumeTrainConfig
was added to support resuming. - [2017/10/21] tensorpack is gradually switching to a new Trainer API. The old API will keep working for a while. See issue for details.
- [2017/10/18]
TrainConfig(predict_tower)
was deprecated. You can set the inference device directly when creating theInferenceRunner
callback. - 2017/10/12.
tensorpack.RL
was deprecated. The RL examples are rewritten with OpenAI gym interface instead. - 2017/10/10.
tfutils.distributions
was deprecated in favor oftf.distributions
introduced in TF 1.3. - 2017/08/02.
Trainer.get_predictor
now takes GPU id. AndTrainer.get_predictors
was deprecated. - 2017/06/07. Now the library explicitly depends on msgpack-numpy>=0.3.9. The serialization protocol becomes incompatible if you've been using <0.3.9.
- 2017/05/06.
replace_get_variable
was deprecated in favor of the officialcustom_getter
interface.{freeze,remap}_get_variable
was renamed to{freeze,remap}_variables
. - 2017/04/09.
ParamRestore
was renamed toDictRestore
. - 2017/03/16.
session_config
option inPredictConfig
is deprecated. Usesession_creator
to define how to create session instead. - 2017/02/20. The interface of step callbacks are changed to be the same as
tf.train.SessionRunHook
. If you haven't written any custom step callbacks, there is nothing to do. Otherwise please refer to the existing callbacks. - 2017/02/12.
TrainConfig(optimizer=)
was deprecated. Now optimizer is set inModelDesc
. And gradient processors become part of an optimizer.
- 2017/02/11.
_get_input_vars()
inModelDesc
was renamed to_get_inputs
.InputVar
was renamed toInputDesc
. - 2017/01/27.
TrainConfig(step_per_epoch)
was renamed tosteps_per_epoch
. - 2017/01/25.
Argument order of
models.ConcatWith
is changed to follow the API change in TensorFlow upstream. - 2017/01/25.
TrainConfig(callbacks=)
now takes a list ofCallback
instances. - 2017/01/06.
summary.add_moving_summary
now takes any number of positional arguments instead of a list. - 2017/01/05.
The argument
TrainConfig(dataset=)
is renamed toTrainConfig(dataflow=)
. - 2016/12/15.
The
predict_tower
option is inTrainConfig
now instead ofTrainer
. - 2016/11/10.
The
{input,output}_var_names
argument inPredictConfig
is renamed to{input,output}_names
. - 2016/11/06.
The inferencer
ClassificationError
now expects the vector tensor returned byprediction_incorrect
instead of the "wrong" tensor. - 2016/10/17.
Conv2D
andFullyConnect
usetf.identity
by default instead oftf.nn.relu
. - 2016/09/01.
The method
_build_graph
ofModelDesc
doesn't takeis_training
argument anymore. Theis_training
attribute can be obtained from tower context. - 2016/05/15.
The method
_get_cost
ofModelDesc
is replaced by_build_graph
.