filter_api.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:photo-editing-tensorflow 作者: JamesChuanggg 项目源码 文件源码
def _random_curve(self, nr_curves):
    curves = []
    for i in range(nr_curves-1):
      curve = [(0,0)]
      # exlcude the 0 and 255
      _x = numpy.sort(random.sample(range(1, 255), 32))
      _y = numpy.sort(random.sample(range(1, 255), 32))
      #_x = numpy.sort(numpy.random.randint(1, 255, 2))
      #_y = numpy.sort(numpy.random.randint(1, 255, 2))
      # _x[0] and _x[1] can't be the same

      curve.append((_x[0], _y[0]))
      curve.append((_x[1], _y[1]))
      curve.append((255,255))
      curves.append(curve)
    curves.append([(255,255)])
    return curves
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号