google/prettytensor

Please document API changes

Hvass-Labs opened this issue · 6 comments

I've used PrettyTensor for several of my tutorials on TensorFlow:

https://github.com/Hvass-Labs/TensorFlow-Tutorials

I don't think I've updated PT in several months because everything seemed to work fine for me. But recently I started getting reports that softmax_classifier() did not work with the class_count keyword anymore. It appears it has changed to num_classes instead. I prefer the new keyword, but it was a rather significant API change which broke all my code, and it is not listed in the change-log:

https://github.com/google/prettytensor/blob/master/CHANGELIST.md

In the future, please list all important changes in the log.

I'm going through my tutorials now to update them, but I would prefer to wait until the deprecation warnings are removed, see #41.

I was trying to work on pretty tensor from your tutorials. I did change the softmax classifier function parameter from class_count to num_classes. but still its not working.
with pt.defaults_scope(activation_fn=tf.nn.relu): y_pred, loss = x_pretty.\ conv2d(kernel=5, depth=16, name='layer_conv1').\ max_pool(kernel=2, stride=2).\ conv2d(kernel=5, depth=36, name='layer_conv2').\ max_pool(kernel=2, stride=2).\ flatten().\ fully_connected(size=128, name='layer_fc1').\ softmax_classifier(num_classes=10, labels=y_true)

Its giving me the following issue:
image

@puri3ume Thanks for reporting this. It looks like it is issue #41 that is the problem. I'm just waiting for the fix to PrettyTensor so I can update the tutorials.

Sorry about the many API changes. I plan to have a more regular release cycle during this time of rapid TF changes and hopefully that will help fix things.

I've tried to document most of it here:
https://github.com/google/prettytensor/blob/master/CHANGELIST.md

@puri3ume, are you using the latest version? I've updated this recently and scalar_summary should no longer be called anywhere. If an update doesn't fix it, please create a new bug so that I can track it separately.

Thanks @eiderman @Hvass-Labs . It worked after update and num_class change in softmax .

Thanks for the quick update, I appreciate it!

The deprecation warnings are now gone and I have updated all my tutorials.

Tiny note: You forgot to update pt.__version__ :-)