Set Sail for a Ship-Shape Istio Release
#IstioCon Set Sail for a Ship-Shape Istio Release Brian Avery / twitter: @briansvgs / Red Hat Senior Software Engineer Eric Van Norman / twitter: @kf0s / IBM Senior Software Engineer #IstioCon First0 码力 | 18 页 | 199.43 KB | 1 年前3keras tutorial
layers import Dense, Activation model = Sequential() model.add(Dense(512, activation='relu', input_shape=(784,))) Where, Line 1 imports Sequential model from Keras models Line 2 imports Dense Dense, Activation, Dropout model = Sequential() model.add(Dense(512, activation='relu', input_shape=(784,))) model.add(Dropout(0.2)) model.add(Dense(512, activation='relu')) model.add(Dropout(0.2)) hold 3-D shape is shown below: Keras 22 >>> data = k.placeholder(shape=(1,3,3)) >>> datashape=(1, 3, 3) dtype=float32> If you use int_shape(), it 0 码力 | 98 页 | 1.57 MB | 1 年前3Design Patterns
100+ developersclass Shape { public: virtual ~Shape() = default; virtual void draw() const = 0; // ... several other virtual functions }; class Circle : public Shape { public: default; virtual void draw( ConcreteShape const& shape ) const = 0; }; 57 A Classic Object-Oriented Solutionclass Shape { public: virtual ~Shape() = default; virtual void draw() const const = 0; // ... several other virtual functions }; class Circle : public Shape { public: Circle( double rad, std::unique_ptr>&& ds ) : radius{ rad } , // . 0 码力 | 136 页 | 7.95 MB | 5 月前3Breaking Dependencies: The SOLID Principles
Construction)enum ShapeType { circle, square }; class Shape { public: explicit Shape( ShapeType t ) : type{ t } {} virtual ~Shape() = default; ShapeType getType() const noexcept; noexcept; private: ShapeType type; }; class Circle : public Shape { public: explicit Circle( double rad ) : Shape{ circle } , radius{ rad } , // ... Remaining data members Approachenum ShapeType { circle, square }; class Shape { public: explicit Shape( ShapeType t ) : type{ t } {} virtual ~Shape() = default; ShapeType getType() const noexcept;0 码力 | 96 页 | 2.14 MB | 5 月前3Keras: 基于 Python 的深度学习库
import Sequential from keras.layers import Dense, Activation model = Sequential([ Dense(32, input_shape=(784,)), Activation('relu'), Dense(10), Activation('softmax'), ]) 也可以使用 .add() 方法将各层添加到模型中: 因为下面的层可以自动地推断尺寸)需要接收关于其输入尺寸的信息。有几种方法来做到这一 点: • 传递一个 input_shape 参数给第一层。它是一个表示尺寸的元组 (一个整数或 None 的元 组,其中 None 表示可能为任何正整数)。在 input_shape 中不包含数据的 batch 大小。 • 某些 2D 层,例如 Dense,支持通过参数 input_dim 指定输入尺寸,某些 batch_size 参数给一个层。如果你同时将 batch_size=32 和 input_shape=(6, 8) 传递给一个层,那么每一批输入的尺寸就为 (32,6,8)。 因此,下面的代码片段是等价的: model = Sequential() model.add(Dense(32, input_shape=(784,))) model = Sequential() model.add(Dense(320 码力 | 257 页 | 1.19 MB | 1 年前3【PyTorch深度学习-龙龙老师】-测试版202112
的重 要功能就是利用 GPU 方便地实现并行计算加速功能。为了演示 GPU 的加速效果,我们通 过完成多次矩阵?和矩阵?的矩阵相乘运算,并测量其平均运算时间来比对。其中矩阵?的 shape 为[1,?],矩阵?的 shape 为[?, 1],通过调节?即可控制矩阵的大小。 首先分别创建使用 CPU 和 GPU 环境运算的 2 个矩阵,代码如下: # 创建在 CPU 上运算的 2 个矩阵 量的真实样本数据。以手写的数 字图片识别为例,如图 3.1 所示,需要收集较多的由真人书写的 0~9 的数字图片,为了便 于存储和计算,通常把收集的原始图片缩放到某个固定的大小(Size 或 Shape),比如 224 个 像素的行和 224 个像素的列(224 × 224),或者 96 个像素的行和 96 个像素的列(96 × 96), 图片样本将作为输入数据 x。同时,还需要给每一张图片标注一个标签(Label)信息,它将 对象是如何产生批量数据的,可以试着加载一个批的数据并 观察。代码如下: # 加载一个批数据,并观察数据形状 x, y = next(iter(train_loader)) print(x.shape, y.shape, x.min(), x.max()) plot_image(x, y, 'Image') # 观察图片 运行可得批中 x 的形状为:torch.Size([512, 1, 280 码力 | 439 页 | 29.91 MB | 1 年前3Inkscape Beginners’ Guide 1.1
at high resolutions (lots of pixels in a small area) you can have very fine control over color and shape; raster images can contain millions of colors and look very realistic. However, the major downside several ways for creating vector images, which can, of course, be combined: using the geometric shape tools using the path tools, much like a pencil on paper starting from a photo, a scanned image, or In this section, we’ll start out by exploring the easiest way to create a drawing in Inkscape: the shape tools. We will also get to know some of the most commonly used tools or features. If you have any0 码力 | 241 页 | 14.61 MB | 1 年前3Inkscape Beginners’ Guide latest
at high resolutions (lots of pixels in a small area) you can have very fine control over color and shape; raster images can contain millions of colors and look very realistic. However, the major downside several ways for creating vector images, which can, of course, be combined: using the geometric shape tools using the path tools, much like a pencil on paper starting from a photo, a scanned image, or In this section, we’ll start out by exploring the easiest way to create a drawing in Inkscape: the shape tools. We will also get to know some of the most commonly used tools or features. If you have any0 码力 | 240 页 | 15.19 MB | 1 年前3Inkscape Beginners’ Guide latest
. . . . . . . . . . . . . . . . . . . . . . . . . 52 8 Ways of Drawing in Inkscape 54 1 9 The Shape Tools 55 10 The Selector Tool 57 10.1 Paste on top of selection . . . . . . . . . . . . . . . . Node Tool 97 23 Node Tool Options 100 24 About Node Types 104 25 Editing Nodes on a Geometrical Shape 107 26 The Tweak Tool 108 27 Colors 111 28 The Color Palette 112 29 The Fill and Stroke Dialog at high resolutions (lots of pixels in a small area) you can have very fine control over color and shape; raster images can contain millions of colors and look very realistic. However, the major downside0 码力 | 237 页 | 13.11 MB | 1 年前3Inkscape Beginners’ Guide 1.1
. . . . . . . . . . . . . . . . . . . . . . . . . . 54 8 Ways of Drawing in Inkscape 56 9 The Shape Tools 57 1 10 The Selector Tool 59 10.1 Paste on top of selection . . . . . . . . . . . . . . Node Tool 99 23 Node Tool Options 102 24 About Node Types 106 25 Editing Nodes on a Geometrical Shape 109 26 The Tweak Tool 110 27 Colors 113 28 The Color Palette 114 29 The Fill and Stroke Dialog at high resolutions (lots of pixels in a small area) you can have very fine control over color and shape; raster images can contain millions of colors and look very realistic. However, the major downside0 码力 | 239 页 | 12.65 MB | 1 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100