8 Matching Annotations
  1. Jan 2021
    1. Keras is a user centric library whereas Tensorflow especially Tensorflow 1.0 is a machine centric library. ML researchers think in terms of terms of layers, automatic differentiation engines think in terms of computational graphs.As far as I’m concerned my time is more valuable than the cycles of a machine so I’d rather use something like Keras.

      Why simplicity of Keras is important

    2. A matrix is a linear map but linear maps are far more intuitive to think about than matrices
  2. Mar 2020
    1. Here’s my preferred way of doing it, which uses Keras’s Tokenizer class

      Keras's Tokenizer Class - Victor's preferred way of implementing BOW in Python

    2. vectors here have length 7 instead of 6 because of the extra 0 element at the beginning. This is an inconsequential detail - Keras reserves index 0 and never assigns it to any word.

      Keras always reserves 0 and never assigns any word to it; therefore, even when we have 6 words, we end up with the length of 7:

      [0. 1. 1. 1. 0. 0. 0.]

  3. Sep 2018
    1. 注意 keras 处理 CNN 的形状

      在 keras 中 fit 给 CNN 的数据集的形状必须是:

      theano: (-1, channel, height, width)

      tensorflow: (-1, height, width, channel)


      model.add( Conv2D(kernelNum, (kernelHeight, kernelWidth), input_shape=(dataPointChannel, dataPointHeight, dataPointWidth), data_format='channels_first'))


    1. from vis.modifiers import Jitter

      Here the code is obsoleted, should change to:

      from vis.input_modifiers import Jitter

    2. from vis.utils.vggnet import VGG16

      Here the vis.utils.vggnet is deleted, should change with keras original package:

      from keras.applications.vgg16 import VGG16

    1. @mingrutar - Correction: config = tf.ConfigProto() config.gpu_options.allow_growth = True session = tf.Session(config=config)

      当运行 keras 进行模型训练时,如果遇到以下错误:

      failed to create cublas handle: CUBLAS_STATUS_ALLOC_FAILED