DEBUG

  1. UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0x80 in position 3131: invalid start byte解决办法
  2. 阿里drl_binpacking使用TensorFlow1.0.0,升级到1.12.0有问题,部分找不到的函数名可以直接copy源码调用:
       tf.contrib.seq2seq.dynamic_rnn_decoder -> dynamic_rnn_decoder源码
       ops可以试下TensorFlow2.0中的包:from tensorflow.python.framework import ops
  3. TypeError: Unexpected keyword argument passed to optimizer: learning_rate
    出错原因:在新版本的keras中(指大于等于2.3.0版本),将原来的 lr 这一参数重命名为 leraning_rate。因此可以有两种处理方式:
  • 换个keras版本
  • 将model.h5中的learning_rate改为lr,具体操作见链接
import h5py

f = h5py.File("./save/model.h5", 'r+')
data_p = f.attrs['training_config']
data_p = data_p.decode().replace("learning_rate","lr").encode()
f.attrs['training_config'] = data_p
f.close()
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值