php intl 参数格式不适用于yii2

问题描述

我用过 https://www.yiiframework.com/doc/guide/2.0/en/tutorial-i18n#parameter-formatting

但在我的服务器上,它显示一个完整的字符串,没有任何 intl 的影响。

我的代码是这样的:

labels,masks,Boxes = self.readxml(annotation_path,img.size)     
print(labels)
print(masks.shape)
print(Boxes)

预期结果:

[3,3,1]
(8,576,720)
[[101,351,124,394],[96,430,126,482],[110,509,141,571],[472,332,515,375],[541,272,585,309],[487,269,529,316],[379,149,418,176],[441,508,189]]
[3,2,1,720)
[[164,402,221,465],[260,390,322,487],[328,325,372,372],[312,287,374,322],[318,218,339,236],[180,257,225,289],[400,246,534,326],189,229]]
[1,3]
(7,720)
[[127,353,233,570],[308,239,333,272],[270,223,294,253],[232,200,264,247],[323,214,344,234],[366,278,439,311],[583,275,656,326]]
[3,4,4]
(15,720)
[[240,173,289,220],[83,190,127,233],[158,243,213,305],[79,300,109,359],[58,403,101,478],[297,348,354,403],[301,222,347,270],[402,297,448,361],[455,324,506,390],[482,445,546,500],[486,480,517,508],[529,419,600,483],[561,46,604,82],[559,138,603,189],[187,308,210,345]]
[3,3]
(18,720)
[[273,158,321,202],143],[278,84,323,132],[179,67,101],[131,23,174,71],[495,456,566,524],507,547,[302,358,369],[268,400,290,431],[325,360,383,417],[206,475,268,540],[465,196,556,318],[451,168,493,211],[520,103,558,139],[586,34,622,69],[568,134,609,184],[650,135,688,224],[298,142,346,184]]
/home/centos/anaconda3/lib/python3.8/site-packages/torch/nn/functional.py:3103: UserWarning: The default behavior for interpolate/upsample with float scale_factor changed in 1.6.0 to align with other frameworks/libraries,and Now uses scale_factor directly,instead of relying on the computed output size. If you wish to restore the old behavior,please set recompute_scale_factor=True. See the documentation of nn.Upsample for details. 
  warnings.warn("The default behavior for interpolate/upsample with float scale_factor changed "
[3,2]
(10,720)
[[295,462,514],[347,401,461],[386,414,433,459],[483,443,480],370,485,414],[408,359,453,402],[452,301,500,353],[493,306,537,[491,465,541,532],145,573,208]]
[3,4]
(7,720)
[[193,317,242,379],[262,380],[319,382],[518,273,597,310],[313,274,384,308],[477,256,489,291],[458,474,291]]
[3,3]
(15,720)
[[136,182,151],[184,129,228,178],[85,65,115],122,575,172],[230,157,305,[300,349,[344,265,385,328],[89,137,240],[109,244,131,274],[84,309,114,371],248,474],[557,421,636,507],[554,598,206],[633,60,676,107]]
[3,3]
(27,720)
[[598,102,642,150],[570,608,192],481,199,558],38,121,73],[125,69,167,105],[191,94,259,161],[152,117,163],[211,262,205],[299,162,216],[295,209,260],[333,156,379,[378,146,196],[399,236,450,288],[442,229,495,280],[352,335,413,396],[287,316,410],[363,476,429,544],483,565,573],[514,591,535],[519,407,476],[490,522,324],[585,618,314],[642,675,[434,89,478,119],[526,75,574,107],[340,61,391,108],[129,40,172,76]]
[3,4]
(12,720)
[[95,328,381],[15,313,92,358],204,266,293],[138,203,303],420,340],[303,224,250],[273,298,246],[530,435],286,555,[461,281,496,325],258],[428,260,287]]
[3,3]
(16,720)
[[124,100,142],[293,208,345,262],[176,173],[143,247,333],311,115,385],366,370],[335,381,315],[317,[467,518,408],[503,455,578,519],[437,152,269],[582,646,[23,482,86,[556,150,203],[592,633,157],[632,106]]
Epoch: [0]  [  0/303]  eta: 0:09:51  lr: 0.000000  loss: -262.4095 (-262.4095)  loss_classifier: 1.5747 (1.5747)  loss_Box_reg: 0.6368 (0.6368)  loss_mask: -264.8073 (-264.8073)  loss_objectness: 0.1623 (0.1623)  loss_rpn_Box_reg: 0.0240 (0.0240)  time: 1.9534  data: 0.3372  max mem: 4226
[3,3]
(13,720)
[[191,149],130,155],[282,342,168],161,386,186],[397,164,442,198],[453,179,207],[92,205,125,257],[103,392],[259,488,547],[426,380,472,425],382,621,433],250,567,285],614,302]]
[3,4]
(21,720)
[[325,371,102],[133,42,171,[100,51,136,84],74,181,114],[195,110,237,146],[265,113,310,158],[193,144,238,[246,[329,320,243],[331,245],[385,212,405,235],[162,230,529],[372,421],[425,453],397,456],[555,80,563,[637,49,682,95],[549,486,626,555],[374,398,472]]
[3,3]
(11,387,451],[459,303,499,351],569,[450,245,275],[479,220,503,[429,[326,234,227,[234,277,271,[338,211,231],[181,720)
[[109,105,133],[174,148],[237,[286,166],[351,393,177],[412,139,[447,514,641,[534,580,317],531,363],[474,444,532,504],461,515],416,472],99,222]]
[3,3]
(8,720)
[[100,367],[98,452,501],[264,479,538],446,[484,356,634,[499,549,348],[569,255,292],159,538,185]]
[3,720)
[[165,367,423],[269,340,395],[236,332],[148,327],[307,[362,408,[12,93,349],295],251,[205,261,290],[330,226]]
[3,4]
(10,720)
[[248,336,388],[321,319,363,312,253,357],468,426,550],329,[457,[443,[498,235,259],259]]
[3,3]
(6,427,240,505],[373,449,457,528],[336,395,438],[250,[219,296,319],279,267]]
[3,3]
(14,720)
[[151,118,184,[215,154],108,219,135],[294,373,[94,270,[105,416],[350,489],[395,410,444],[445,[558,263,299],[501,180,523,[375,460,684,265]]
[3,1]
(14,720)
[[159,388,226,460],231,[126,207,329],[212,285,284,313],[280,[314,341,242],[243,[489,286],[504,191,233]]
[3,3]
(10,720)
[[103,422],391],[210,296],288,282],423,336],473,615,499],[292,318,232],[448,270]]
[3,720)
[[184,232,387],241,[242,276,239],217,237],[360,[405,252,435,287],[527,552,[468,490,238],178,521,286]]
[3,720)
[[269,330,314,384],[201,292,[354,375,[272,261],[288,216,[227,252],[315,552],[588,647,418],[510,570,420],[415,282,548,321],[500,533,720)
[[335,[221,254,337,273],230],[346,369,226],[382,432,326,502,[646,719,312],[436,258,469,316]]
[1,720)
[[280,169,300],[607,91,[565,606,193],[173,174],[522,120,376],392,440],[178,266],148,[66,[70,442],[469,431,542,502],[601,687,[639,53,679,96]]
[3,720)
[[432,197],183,221],106,352,[90,[87,116,[492,[440,399],283,590,568,291]]
[2,720)
[[144,556],572],[337,389,415],267,302],[130,301],[194,338,298],[406,434,299]]
[3,720)
[[259,302,400],[106,355,412],[88,330],[175,[36,76,335],[279,[396,294],[494,572,[620,694,306],206,[580,661,482]]
[3,3]
(17,171],[239,295,509],[316,546],361,[381,154,[446,491,279],[598,17,632,53],[653,[677,720,300]]
[3,1]
(13,720)
[[181,413],386],[202,334],437,[478,539,[475,422,[502,198,[387,574],[226,192,228]]
[3,4]
(24,720)
[[293,436,486],[342,445],[370,464],350,393],[421,470,354],[470,512,377],71,[127,107,[225,[73,96,190],112,271],364],104,[638,666,613,629,256],[497,[391,[524,550,339]]
[1,720)
[[274,166,297],[539,417,612,485],530,419],[609,[636,487,718,560],[139,185,[55,495],559],[281,462],[235,398],1]
(11,720)
[[265,415,327,[267,338],[222,254],[349,[404,459,[533,577,350],[435,[623,691,320],288]]
[3,720)
[[246,357,153,[228,[271,471,295]]
[1,720)
[[152,145],210],544,592,477,467],466,513],[86,643,254]]
[4,3]
(31,720)
[[45,62,59,[150,87,188,118],129],[157,202,214],315,[284,143,[361,153],464,182],[414,177,204],[431,[505,559,195,594,[587,631,200],[604,657,[432,373],[384,409,[309,522],[207,554],217]]
[3,720)
[[167,394,496],[332,[257,406],[238,[473,[291,215,451,241],237]]
[3,3]
(4,720)
[[404,276],197,513,720)
[[129,409],[41,323],251],[364,467,551],[496,365,560,443],[600,671,[454,284],225]]
[3,720)
[[250,568],[164,[56,90,[156,263],[322,280,540,[546,617,447],356]]
[2,3]
(9,720)
[[336,396,477],331],[244,362,[550,450],551,304,525,301]]
[3,2]
(9,720)
[[130,127],123,[377,458,185],176,492,[621,644,[456,360],[107,447,517]]
[3,720)
[[117,[172,[154,424,539],475],[339,401],[398,[355,[248,283],[488,3]
(12,720)
[[299,[540,584,[189,[578,128],27,658,119,[132,[95,299,[59,494],527,[573,133,[654,78,686,140]]
[3,720)
[[162,[258,268],[480,[403,[449,715,314]]
[3,4]
(13,720)
[[255,525],530],455],[111,[274,223],337],607,713,463,238]]
[4,1]
(28,720)
[[237,96],121],95,377,165],160],[253,151,[508,454,588,[204,249,19,56],[119,66,54,87],155,[462,[411,88,57,112],[614,6,41],44,619,78],579,125],[579,82,131],[528,599,[662,193,700,[617,652,672,106],543,389]]
[3,720)
[[88,201,229],331,517],334,520,[543,582,205]]
[3,720)
[[175,120],[229,130],208],[507,181],[60,68,91],344],458],494,389],665,280]]
[3,720)
[[393,165,[233,134],[196,98,163,123],[99,77,104],470],[538,583,[80,209],[97,378,504]]
[3,85,126],[622,72],[146,194,399,507]]
Loss is nan,stopping training
{'loss_classifier': tensor(nan,device='cuda:0',grad_fn=<NllLossBackward>),'loss_Box_reg': tensor(nan,grad_fn=<DivBackward0>),'loss_mask': tensor(-2.1386e+22,grad_fn=<BinaryCrossEntropyWithLogitsBackward>),'loss_objectness': tensor(0.7630,'loss_rpn_Box_reg': tensor(0.0572,grad_fn=<DivBackward0>)}
An exception has occurred,use %tb to see the full traceback.

SystemExit: 1


/home/centos/anaconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py:3435: UserWarning: To exit: use 'exit','quit',or Ctrl-D.
  warn("To exit: use 'exit',or Ctrl-D.",stacklevel=1)

但它在这里显示整个表达式没有任何效果

这里是PHP信息

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...