【NLP】GlobalAveragePooling1D

content
    embedding_dim=16
    
    model = keras.Sequential([
      layers.Embedding(vocab_size, embedding_dim, input_length=maxlen),
      layers.GlobalAveragePooling1D(),
      layers.Dense(16, activation='relu'),
      layers.Dense(1, activation='sigmoid')
    ])
    

    GlobalAveragePooling1D: return a fixed-length output vector for each example by averaging over the steps dimension. This allows the model to handle input …

    more ...



    Conda

    Date Tags Conda

    anaconda3多用户共享安装

    > sudo bash Anaconda-latest-Linux-x86_64.sh
    
    > linux下安装第三方多用户使用的共享软件一般都按在 /usr/local 目录
    
    > 配置 /etc/profile 文件,在 …
    more ...


    Spark

    Date

    3.spark简介

    3.1.spark定义

    spark是基于内存的, 分布式的, 大数据并行计算框架(处理引擎)

    迭代式计算,优先使用内存,内存不足,再使 …

    more ...


    Scala Tips

    Date Tags Scala
    content
      • foreach
      val xs = List("date", "since", "other1", "other2")
      
      xs.foreach { str =>
      
          str match {
              case "date"  => println("Match Date")
              case "since" => println("Match Since")
              case unknow  => println("Others")
          } 
      
          println("Put your post step here")
      }
      

      注意:如果要使用一段代码作为foreach()的参 …

      more ...