当前位置:网站首页>not all arguments converted during string formatting
not all arguments converted during string formatting
2022-07-23 19:18:00 【Zero point_ ling】
Translated into : Not all parameters are converted during string formatting
In fact, this error is caused by the incorrect format of variables ,
stay python Array , The element type in the array is character , When it is expected to be used int Type , Need to use int()
The following code ,eachOutChannel It's an array , Be similar to [64,64,'M',128.....]
In the output channel of neural network , The output channel type is expected to be int, You need to use int() Do type conversion .
for v in eachOutChannel:
if v == 'M':
layers += [nn.MaxPool2d(kernel_size=2, stride=2)]
else:
conv2d = nn.Conv2d(in_channel, int(v), kernel_size=3, padding='same')
layers += [conv2d, nn.ReLU(True)]
in_channel = int(v)边栏推荐
- .NET Core 实现后台任务(定时任务)Longbow.Tasks 组件(三)
- Elk note 25 - expérience rapide APM
- [2020] [paper notes] optically controlled spectral ratio adjustable y based on two-dimensional photonic crystal——
- [C language] program environment and preprocessing
- SQL statement exercise
- How can win11 add 3D effects to pictures? Win11 method of adding picture 3D effect
- DP problem collection
- DevStack云计算平台快速搭建
- canvas绘制文本和清除绘制
- Todo fix bug tag feature and other configurations
猜你喜欢

小鱼送激光雷达啦 | 恰饭即抽奖第一期

Storage structure and method of graph (II)

11.神经网络基本概念

FPGA基于spi的flash读写

There is great competition pressure for software testing jobs, and the "migrant workers" who graduated from 985 also suffer

Error reporting caused by the use of responsebodyadvice interface and its solution

国外芯片,为什么有中文资料和网页?

lendingclub贷款状态loan status业务详解-current,charge off,issued,Fully Paid,grace period

人脸识别系统技术方案
![Paddlenlp's UIE classification model [taking emotional propensity analysis news classification as an example] including intelligent annotation scheme)](/img/00/e97dcac9f07e5d4512614536a17cd4.png)
Paddlenlp's UIE classification model [taking emotional propensity analysis news classification as an example] including intelligent annotation scheme)
随机推荐
1、 Reptile concept and basic process
FPGA flash reading and writing based on SPI
ES6其他语法及扩展语法总结
398. Random number index hash table method
图学习总结
Shell
11.神经网络基本概念
LeetCode每日一题(1514. Path with Maximum Probability)
Shell
Implementation of SPI communication protocol based on FPGA
C language small project - address book (static version + dynamic version + file version)
Application of jishili electrometer in testing scheme of new energy battery
TODO FIXME BUG TAG FEATURE 等配置
Notes of benthos
.net core implements background tasks (scheduled tasks) longbow Tasks component (III)
.NET Core 实现后台任务(定时任务)Longbow.Tasks 组件(三)
Alibaba最新神作!耗时187天肝出来1015页分布式全栈手册太香了
.NET Core 实现后台任务(定时任务)Longbow.Tasks 组件(三)
多线程&高并发(全网最新:面试题+导图+笔记)面试手稳心不慌
Tree learning summary