text:
package com.intel.analytics.bigdl.optim

import com.intel.analytics.bigdl.tensor.Tensor
import com.intel.analytics.bigdl.utils.{File, T, Table}
import org.apache.commons.lang3.SerializationUtils

import scala.reflect.ClassTag

/**
 * Similar to torch Optim method, which is used to update the parameter
 */
trait OptimMethod[@specialized(Float, Double) T] extends Serializable {

  /**
   * Optimize the model parameter
   *
   * @param feval     a function that takes a single input (X), the point of a evaluation,
   *                  and returns f(X) and df/dX
   * @param parameter the initial point
   * @return the new x vector and the function list, evaluated before the update
   */
  def optimize(feval: (Tensor[T]) => (T, Tensor[T]), parameter: Tensor[T])
  : (Tensor[T], Array[T])

  /**
   * Clear the history information in the OptimMethod state
   *
   * @return
   */
  def clearHistory(): Unit

  /**
   * Update hyper parameter.
   * We have updated hyper parameter in method optimize(). But in DistriOptimizer, the method
   * optimize() is only called on the executor side, the driver's hyper parameter is unchanged.
   * So this method is using to update hyper parameter on the driver side.
   *
   * @return A string.
   */
  def updateHyperParameter(): Unit = {}

  /**
   * Get hyper parameter from config table.
   *
   */
  def getHyperParameter(): String = ""

  /**
   * clone OptimMethod
   *
   * @return
   */
  override def clone(): OptimMethod[T] = SerializationUtils.clone(this)

  /**
   * get learning rate
   *
   * @return
   */
  def getLearningRate(): Double

  // a table describing the state of the optimizer; after each call the state is modified
  private[bigdl] var state: Table = T(
    "epoch" -> 1,
    "neval" -> 1
  )

  /**
   * save OptimMethod
   *
   * @param path      path
   * @param overWrite whether to overwrite
   * @return
   */
  def save(path: String, overWrite: Boolean = false): this.type = {
    this.clearHistory()
    File.save(this, path, overWrite)
    this
  }

  /**
   * load optimMethod parameters from Table
   * @param config
   * @return
   */
  def loadFromTable(config: Table): this.type

  /**
   * Optimize the model parameter
   *
   * @param feval     a function that takes a single input (X), the point of a evaluation,
   *                  and returns f(X) and df/dX
   * @param parameter the initial point
   * @param config    a table with configuration parameters for the optimizer
   * @param state     a table describing the state of the optimizer; after each call the state
   *                  is modified
   * @return the new x vector and the function list, evaluated before the update
   */
  @deprecated(
    "Please initialize OptimMethod with parameters when creating it instead of importing table",
    "0.2.0")
  def optimize(feval: (Tensor[T]) => (T, Tensor[T]), parameter: Tensor[T], config: Table,
               state: Table = null): (Tensor[T], Array[T]) = {
    val _config = if (config == null) T() else config
    this.state = if (state == null) _config else state
    this.loadFromTable(config)
    val res = optimize(feval, parameter)
    config.update("clr", this.getLearningRate())
    res
  }

  /**
   * Clear the history information in the state
   *
   * @param state
   * @return
   */
  @deprecated(
    "Please use clearHistory() instead",
    "0.2.0")
  def clearHistory(state: Table): Table = {
    this.state = state
    this.clearHistory()
    this.state
  }

  /**
   * Update hyper parameter.
   * We have updated hyper parameter in method optimize(). But in DistriOptimizer, the method
   * optimize() is only called on the executor side, the driver's hyper parameter is unchanged.
   * So this method is using to update hyper parameter on the driver side.
   *
   * @param config config table.
   * @param state  state Table.
   * @return A string.
   */
  @deprecated(
    "Please use updateHyperParameter() instead",
    "0.2.0")
  def updateHyperParameter(config: Table, state: Table): Unit = {}

  /**
   * Get hyper parameter from config table.
   *
   * @param config a table contains the hyper parameter.
   */
  @deprecated(
    "Please use getHyperParameter() instead",
    "0.2.0")
  def getHyperParameter(config: Table): String = ""

}

object OptimMethod {
  /**
   * load optim method
   * @param path file path
   * @return
   */
  def load[T: ClassTag](path : String) : OptimMethod[T] = {
    File.load[OptimMethod[T]](path)
  }
}


text:
Sky sets 20% BAME target
BBC takes Red Bee deals to 2017 as overhaul continues
By George Bevir2013-06-20T10:58:00+01:00
The BBC has extended Red Bee Media's contracts to provide playout, metadata and interactive services by 18 months, to give it more time to overhaul the way it broadcasts and publishes content.
The initial 10-year contracts for playout and metadata services, which were signed when Red Bee was spun off from the BBC, were due to end in December 2015.
The contract for interactive services was meant to expire three months before that, in September 2015.
The extensions mean that all three contracts are now aligned and will end together in March 2017.
The BBC has said it wants to move to a "new solution and operating model" from April 2017, and is keen to ensure there is no disruption to its broadcasting operations in 2016, which it described as an "operationally critical year", with major events including the Rio Olympic Games.
The BBC anticipates a two-year transition to whichever company is awarded the new deals once the extended contracts with Red Bee come to an end.
The broadcaster extended the contracts to give it time to "review the broadcast and publication chains and the boundaries which currently exist between various parts of the operation and those responsible for delivering them".
In a series of documents that confirmed the extensions, the BBC said that advances in technology meant the potential scope of the services provided by external suppliers could be more than those outlined in the current contracts.
It will continue researching what form those new models could take this year, before a competitive process begins at the start of next year for the award of new contracts for playout, metadata and interactive services.
Ericsson brings back Red Bee Media brand
Familiar name returns

redpajama_set_name: RedPajamaCommonCrawl