This gist has been superceded by Meta Graph functionality that has since been added to tensorflow core.
The code remains posted for archival purposes only.
First Gist | |
Update | |
Nikita making an edit | |
Another Update |
"""Plugin to display SimpleCV images inline in the IPython notebook""" | |
from cStringIO import StringIO | |
def display_image(img): | |
io = StringIO() | |
img.save(io, 'png') | |
return io.getvalue() | |
ip = get_ipython() | |
png_formatter = ip.display_formatter.formatters['image/png'] | |
png_formatter.for_type(SimpleCV.ImageClass.Image, display_image) |
This gist has been superceded by Meta Graph functionality that has since been added to tensorflow core.
The code remains posted for archival purposes only.
""" | |
Beam decoder for tensorflow | |
Sample usage: | |
``` | |
from tf_beam_decoder import beam_decoder | |
decoded_sparse, decoded_logprobs = beam_decoder( | |
cell=cell, |
package epic.tensorflow | |
import org.bytedeco.javacpp.{tensorflow, BytePointer} | |
import org.bytedeco.javacpp.tensorflow.GraphDef | |
/** | |
* Created by kitaev on 1/22/16. | |
*/ | |
class TensorflowModel(filename: String) { |