精华内容
下载资源
问答
  • 原文 https://stackoverflow.com/questions/34054780/how-can-mongodb-datasize-be-larger-than-storagesize 据我所知,MongoDB的存储大小应始终大于数据大小.但是,升级到Mongo 3.0并使用WiredTiger后,我开始...
    据我所知,MongoDB的存储大小应始终大于数据大小.但是,升级到Mongo 3.0并使用WiredTiger后,我开始看到数据大小大于存储大小.

     

    这是来自其中一个数据库:

     

    { 
        "db" : "Results", 
        "collections" : NumberInt(1), 
        "objects" : NumberInt(251816), 
        "avgObjSize" : 804.4109548241573, 
        "dataSize" : NumberInt(202563549), 
        "storageSize" : NumberInt(53755904), 
        "numExtents" : NumberInt(0), 
        "indexes" : NumberInt(5), 
        "indexSize" : NumberInt(41013248), 
        "ok" : NumberInt(1)
    }

    注意,202563549>到目前为止53755904.我很困惑这是怎么回事.现在在Mongo 3.0中读取db.stats()的方法有何不同?

     
    storageSize指标等于数据库中所有数据扩展区的大小(以字节为单位).如果没有压缩,则此数字大于dataSize,因为它包含尚未使用的空间(在数据范围内)和由范围内已删除或移动的文档腾出的空间.但是,在使用WiredTiger存储引擎时,数据会在磁盘上压缩,因此小于dataSize.

    转载于:https://www.cnblogs.com/xibuhaohao/p/11363804.html

    展开全文
  • tensorflow.python.framework.errors_impl.InvalidArgumentError: Invalid JPEG data or crop window, data size 290491 [[Node: DecodeJpeg_1 = DecodeJpeg[acceptable_fraction=1, channels...

    《Python检测数据不完整的JPG图片》

    tensorflow.python.framework.errors_impl.InvalidArgumentError: Invalid JPEG data or crop window, data size 290491
    	 [[Node: DecodeJpeg_1 = DecodeJpeg[acceptable_fraction=1, channels=3, dct_method="", fancy_upscaling=true, ratio=1, try_recover_truncated=false, _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_DecodeJPGInput_0_0)]]
    	 [[Node: DecodeJpeg_1/_1 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_2_DecodeJpeg_1", tensor_type=DT_UINT8, _device="/job:localhost/replica:0/task:0/device:GPU:0"]()]]
    
    During handling of the above exception, another exception occurred
    
    RuntimeError: Error during processing file train/hentai/c424a28a-33c6-4c2a-95bf-4e5651c480de.jpg (Invalid JPEG data or crop window, data size 290491
    	 [[Node: DecodeJpeg_1 = DecodeJpeg[acceptable_fraction=1, channels=3, dct_method="", fancy_upscaling=true, ratio=1, try_recover_truncated=false, _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_DecodeJPGInput_0_0)]]
    	 [[Node: DecodeJpeg_1/_1 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_2_DecodeJpeg_1", tensor_type=DT_UINT8, _device="/job:localhost/replica:0/task:0/device:GPU:0"]()]]
    
    

    出现这种问题就是因为,里面混入了下载不完整的图片。将这些图片去除掉。方式就是上面链接中的方式。

    展开全文
  • text, data and bss: Code and Data Size Explained 转自https://mcuoneclipse.com/2013/04/14/text-data-and-bss-code-and-data-size-explained/ Posted on April 14, 2013 by Erich Sty

    In “Code Size Information with gcc for ARM/Kinetis” I use an option in the ARM gcc tool chain for Eclipse to show me the code size:

       text       data        bss        dec        hex    filename
     0x1408       0x18      0x81c       7228       1c3c    size.elf

    I have been asked by a reader of this blog what these item numbers really mean. Especially: what the heck is ‘bss’?

    Note: I’m using the ARM GNU ‘printsize’ utility for gcc, with an example for Kinetis-L (KL25Z).

    text

    ‘text’ is what ends up in FLASH memory. I can show this with adding

    1
    2
    3
    voidfoo(void) {
      /* dummy function to show how this adds to 'text' */
    }

    to my program, the ‘text’ part increases so:

       text       data        bss
     0x1414       0x18      0x81c

    Likewise, my new function ‘foo’ gets added to the .text segment, as I can see in the map file generated by the linker:

     *(.text*)
     .text.foo      0x000008c8        0x8 ./Sources/main_c.o
                    0x000008c8                foo

    But it does not only contain functions, it has constant data as too. If I have a constant table like

    1
    constint table[] = {5,0,1,5,6,7,9,10};

    then this adds to ‘text’ too. That variable ‘table’ will be in FLASH, initialized with the values specified in the source.

    Another thing which is included in ‘text’ is the interrupt vector table (more on this later).

    In summary: ‘text’ is what ends up typically in FLASH and has code and constant data.

    data

    ‘data’ is used for initialized data. This is best explained with the following (global/extern) variable:

    1
    int32_t myVar = 0x12345678;

    Adding above variable to my application will increase the ‘data’ portion by 4 bytes:

     text       data        bss
     0x1414     0x1c      0x81c

    This variable ‘myVar’ is not constant, so it will end up in RAM. But the initialization (0x12345678) *is* constant, and can live in FLASH memory. The initialization of the variable is done during the normal ANSI startup code. The code will assign/copy the initialization value. This is sometimes named ‘copy-down’. For the startup code used by CodeWarrior for MCU10.3 for Kinetis-L (ARM Cortex-M0+), this is performed in __copy_rom_sections_to_ram():

    ARM Startup Code Initializing Variables

    ARM Startup Code Initializing Variables

    Just one thing to consider: my variable ‘myVar’ will use space in RAM (4 bytes in my case), *plus* space in FLASH/ROM for the initialization value (0x12345678). So I need to count the ‘data’ size twice: that size will end up in RAM, plus will occupy FLASH/ROM. That amount of data in FLASH is *not* counted in the text portion.

    ❗ The ‘data’ only has the initialization data (in my example 0x12345678. And not the variable (myVar).

    bss

    The ‘bss’ contains all the uninitalized data.

    bss (or .bss, or BSS) is the abbreviation for ‘Block Started by Symbol’ by an old assembler (see this link).

    This is best explained with following (global/extern) variable:

    1
    int32_t myGlobal;

    Adding this variable will increase the ‘bss’ portion by 4:

     text       data        bss
     0x1414     0x18      0x820

    I like to remember ‘bss’ as ‘Better Save Space’. As bss ends up in RAM, and RAM is very valuable for a microcontroller, I want to keep the amount of variables which end up in the .bss at the absolute minimum.

    The bss segment is initialized in the startup code by the zero_fill_bss() function:

    1
    2
    3
    4
    5
    6
    7
    static void zero_fill_bss(void)
    {
        extern char __START_BSS[];
        extern char __END_BSS[];
     
        memset(__START_BSS, 0, (__END_BSS - __START_BSS));
    }

    Size – GNU Utility

    The size (or printsize) GNU utility has more options:

    size [-A|-B|--format=compatibility]
              [--help]
              [-d|-o|-x|--radix=number]
              [--common]
              [-t|--totals]
              [--target=bfdname] [-V|--version]
              [objfile...]

    The ‘System V’ option can be set directly in the Eclipse panel:

    GNU Print Size Option in CodeWarrior for MCU10.3

    GNU Print Size Option in CodeWarrior for MCU10.3

    It produces similar information as shown above, but with greater detail.

    To illustrate this, I use

    1
    int table[] = {1,2,3,4,5};

    While in ‘Berkeley’ mode I get:

       text       data        bss        dec        hex    filename
     0x140c       0x2c      0x81c       7252       1c54    size.elf

    I get this in ‘System V’ mode:

    section                size         addr
    .interrupts            0xc0          0x0
    .text                0x134c        0x800
    .data                  0x14   0x1ffff000
    .bss                   0x1c   0x1ffff014
    .romp                  0x18   0x1ffff030
    ._user_heap_stack     0x800   0x1ffff048
    .ARM.attributes        0x31          0x0
    .debug_info          0x2293          0x0
    .debug_abbrev         0xe66          0x0
    .debug_loc           0x27df          0x0
    .debug_aranges        0x318          0x0
    .debug_macinfo      0x53bf3          0x0
    .debug_line          0x1866          0x0
    .debug_str            0xc23          0x0
    .comment               0x79          0x0
    .debug_frame          0x594          0x0
    Total               0x5defe

    I’m using an ARM Cortex-M0+ in my example, so addresses greater 0x1ffff000 are in RAM.

    The lines from .ARM.attributes up to .debug_frame are not ending up in the target, they are debug and other information.

    .interrupts is my interrupt vector table, and .text is my code plus constants, and is in FLASH memory. That makes the 0xc0+0x134c=0x140c for text in ‘Berkeley’.

    .bss is my uninitialized (zero-outed) variable area. Additionally there is .user_heap_stack: this is the heap defined in the ANSI library for malloc() calls. That makes the total of 0x1c+0x800=0x81c shown in ‘Berkeley’ format.

    .data is for my initialized ‘table[]’ variable in RAM (5*4 bytes=0x14)

    The .romp is used by the linker for the ‘copy-down’ and initialization of .data. But it looks confusing: it is shown with addresses in RAM? Checking the linker map file shows:

    .romp           0x1ffff030       0x18 load address 0x00001b60
                    0x00001b60                __S_romp = _romp_at
                    0x1ffff030        0x4 LONG 0x1b4c ___ROM_AT
                    0x1ffff034        0x4 LONG 0x1ffff000 _sdata
                    0x1ffff038        0x4 LONG 0x14 ___data_size
                    0x1ffff03c        0x4 LONG 0x0
                    0x1ffff040        0x4 LONG 0x0
                    0x1ffff044        0x4 LONG 0x0

    Ah! That actually is not in RAM, but in FLASH: the linker maps this to the FLASH address 0x1b60! So this size 0x18 really needs to be added to the FLASH size too!

    Summary

    I hope I have sorted out things in a correct way. The way how the initialized data is reported might be confusing. But with the right knowledge (and .map file in mind), things get much clearer:

    ‘text’ is my code, vector table plus constants.

    ‘data’ is for initialized variables, and it counts for RAM and FLASH. The linker allocates the data in FLASH which then is copied from ROM to RAM in the startup code.

    ‘bss’ is for the uninitialized data in RAM which is initialized with zero in the startup code.

    Happy Sizing


    展开全文
  • 1 tensorflow.python.framework.errors_impl.InvalidArgumentError: Invalid JPEG data or crop window, data size 32768 2 2 [[Node: DecodeJpeg_1 = DecodeJpeg[acceptable_fraction=1, channels=...

     bug信息

    1 tensorflow.python.framework.errors_impl.InvalidArgumentError: Invalid JPEG data or crop window, data size 32768
    2 2      [[Node: DecodeJpeg_1 = DecodeJpeg[acceptable_fraction=1, channels=3, dct_method="", fancy_upscaling=true, ratio=1, try_recover_truncated=false, _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_DecodeJPGInput_0_0)]]

    是因为我们下载图片时,出现的图片下载不全,或者在数据增强时,出现的不全数据。

    需要找到不正常图片并删除

    正常的图片

    出现下载不全的图片

     可以将挑出有缺陷的图片 并删除

    https://blog.csdn.net/kingroc/article/details/86692156

    展开全文
  • 【MongoDB】查看datasize

    千次阅读 2017-07-22 17:06:38
    想要查看DB和Collecion的datasize可以通过db.stats()和db.collection.stats()db.stats(scale)db.stats(scale) 的参数 scale 指定显示大小的精度,默认是Byte,如果是 db.stats(1024) 则以 KB 显示,以此类推。...
  • 在进行图像处理任务时,遇到错误,Invalid JPEG data or crop window, data size ***,训练程序直接中断。 运行环境:Windows10 + TensorFlow + CUDA + CUDNN + OPENCV 原因分析: 图片在解码时,通常有2种...
  • Output data size does not match net.outputs{2}.size. 具体图片: 出现问题的原因 分析了一波发现原因很简单,就是因为输出层神经元个数和newff函数里设置的不一样,结果就错了。 我用的是这样的代码: clear ...
  • Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/util/unit/DataSize at org.springframework.boot.convert.StringToDataSizeConverter.getConvertibleTypes(S...
  • 启动springboot时报错,...java.lang.NoClassDefFoundError: org/springframework/util/unit/DataSize at org.springframework.boot.convert.StringToDataSizeConverter.getConvertibleTypes(StringToDataSizeC...
  • 转载请注明,原文地址:... [2013-01-25 10:37:14 - ImageGrid] W/ResourceType( 6560): Bad XML block: header size 289 or total size 0 is larger than data size 0 [2013-01-25 10:37:14
  • 关于java.lang.NoClassDefFoundError: org/springframework/util/unit/DataSize的问题 spring boot 开启错误 今天在使用mybatis的基于springboot的框架的基础功能包抽离出来的时候,在增加spring yml自定义设置后,...
  • 今天在使用mybatis的基于springboot的框架的基础功能包抽离出来的时候,在增加spring yml自定义设置后,在业务项目启动时会报出以下异常:java.lang.NoClassDefFoundError: org/springframework/util/unit/DataSize ...
  • tensorflow.python.framework.errors_impl.InvalidArgumentError: Invalid JPEG data or crop window, data size 32768 [[Node: DecodeJpeg_1 = DecodeJpeg[acceptable_fraction=1, channels=3, dct_method="", ...
  • 出现1:当在视频教学中的计算两数积时,运行activity03时,出现错误 原因1:layout中的布局文件***.xml采用了RelativeLayout的相对布局,那么源代码中的TextView,Button,EditText堆积在一起溢出,出错。...
  • 点 Project--------->clean.. 后正常。 附:未生成gen,layout正常,console提示layout中@string有误,查看values下的string,发现是前面 "%%"因版本更新bug,导致后面的string无法生成R文件,后将"%%"删除,点...
  • 对于LONG类型,使用get/setCharaterStream() 
  • <groupId>org.springframework.data <artifactId>spring-data-redis <version>1.6.1.RELEASE <!-- spring2.X集成redis所需common-pool2,使用jedis必须依赖它--> <groupId>org.apache....
  • 问题现象: SpringBoot项目由1.5.x升级到2.x,文件上传启动报错 ...spring.servlet.multipart.max-file-size=50Mb spring.servlet.multipart.max-request-size=50Mb file.upload.realpath=D:/csizgcardmanage/...
  • 在自动生成的\res\menu\main.xml中, 里面有这句android:title="@string/action_settings" 意味着,我们 不小心删了@string(即values文件下)的内容含name为action_settings的属性值
  • 我的就是敲到menu文件夹下的main.xml(本来是layout文件夹下的main.xml
  • spring: servlet: multipart: enabled: true max-file-size: 100000000 max-request-size: 100000000
  • 1.错误描述 在application.yml配置文件中设置上传大小时,使用了Mb的... max-file-size: 10Mb max-request-size: 10Mb 然后启动报错: 二.问题排查解决 看提示是org.springframework.util.unit.DataSi...
  • spring 版本错误。 <spring.version>4.3.16.RELEASE</spring.version> 改成: <spring.version>5.1.7.RELEASE</spring.version>
  • input data size does not match net.inputs{1}.size. 该问题在这里找到了答案  http://stackoverflow.com/questions/16350475/problems-with-network-input-size  I mentioned above that I ...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 91,178
精华内容 36,471
关键字:

datasize