Crystal binding for TensorFlow.
This is an early-stage open-source project. You can call functions from bindings directly, but wrappers are not ready yet.
You need to compile and install libtensorflow.so
from this repo.
Quick instructions:
$ ./configure
$ cd tensorflow
$ bazel build :libtensorflow.so
$ cp ../bazel-bin/tensorflow/libtensorflow.so /usr/local/lib/
Add this to your application's shard.yml
:
dependencies:
tensorflow:
github: fazibear/tensorflow.cr
require "tensorflow"
See examples repository.
错误原因: 这个错误可能是由 from tensorflow.contrib.learn.python.learn.datasets import base 引起的; mnist_class脚本中有read_data_sets函数,base有Datasets()与base.maybe_download() 可能是tensorflow从1.9后的版本把这部分删除了 解决方法 解决方法1: 编写自己的
保存模型时出现以下错误 WARNING:tensorflow:Can save best model only with val_loss available, skipping. 原始代码如下: checkpoint = tf.keras.callbacks.ModelCheckpoint(filepath=path,
1、打开anaconda prompt,激活tensorflow环境; 2、tensorboard --logdir="events.out.tfevents文件夹路径",生成一个地址,如:http://DESKTOP-BCEJ37K:6006 3、在浏览器中打开这个地址就可以看到可视化的结果(打不开,使用http://localhost:6006/)