- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在使用来自 here 的代码( paper here ) 创建 GAN。我正在尝试将其应用到一个新领域,从他们在 MNIST 上的应用切换到 3D 大脑 MRI 图像。我的问题在于 GAN 本身的定义。
例如,他们用于定义生成模型的代码(采用 z_dim 维度的噪声并从 MNIST 分布生成图像,因此 28x28)是这样的,我的评论基于我认为它的工作原理:
def generate(self, z):
# start with noise in compact space
assert z.shape[1] == self.z_dim
# Fully connected layer that for some reason expands to latent * 64
output = tflib.ops.linear.Linear('Generator.Input', self.z_dim,
self.latent_dim * 64, z)
output = tf.nn.relu(output)
# Reshape the latent dimension into 4x4 MNIST
output = tf.reshape(output, [-1, self.latent_dim * 4, 4, 4])
# Reduce the latent dimension to get 8x8 MNIST
output = tflib.ops.deconv2d.Deconv2D('Generator.2', self.latent_dim * 4,
self.latent_dim * 2, 5, output)
output = tf.nn.relu(output) # 8 x 8
# To be able to get 28x28 later?
output = output[:, :, :7, :7] # 7 x 7
# Reduce more to get 14x14
output = tflib.ops.deconv2d.Deconv2D('Generator.3', self.latent_dim * 2,
self.latent_dim, 5, output)
output = tf.nn.relu(output) # 14 x 14
output = tflib.ops.deconv2d.Deconv2D('Generator.Output',
self.latent_dim, 1, 5, output)
output = tf.nn.sigmoid(output) # 28 x 28
if self.gen_params is None:
self.gen_params = tflib.params_with_name('Generator')
return tf.reshape(output, [-1, self.x_dim])
这是我使用 niftynet 卷积层的代码,其中 z_dim 和 latent_dim 与之前相同,均为 64,并且我添加了打印语句的结果:
def generate(self, z):
assert z.shape[1] == self.z_dim
generator_input = FullyConnectedLayer(self.latent_dim * 64,
acti_func='relu',
#with_bn = True,
name='Generator.Input')
output = generator_input(z, is_training=True)
print(output.shape) # (?, 4096)
#output = tflib.ops.linear.Linear('Generator.Input', self.z_dim,
# self.latent_dim * 64, z)
#output = tf.nn.relu(output)
output = tf.reshape(output, [-1, self.latent_dim * 4, 1, 18, 18]) # 4 x 4
print(output.shape) # (?, 256, 1, 18, 18)
generator_2 = DeconvolutionalLayer(self.latent_dim*2,
kernel_size=5,
stride=2,
acti_func='relu',
name='Generator.2')
output = generator_2(output, is_training=True)
#output = tflib.ops.deconv2d.Deconv2D('Generator.2', self.latent_dim * 4,
# self.latent_dim * 2, 5, output)
#output = tf.nn.relu(output) # 8 x 8
print(output.shape) # (?, 512, 2, 36, 128)
#output = output[:, :, :-1, :-1] # 7 x 7
generator_3 = DeconvolutionalLayer(self.latent_dim,
kernel_size=5,
stride=2,
acti_func='relu',
name='Generator.3')
output = generator_3(output, is_training=True)
#output = tflib.ops.deconv2d.Deconv2D('Generator.3', self.latent_dim * 2,
# self.latent_dim, 5, output)
#output = tf.nn.relu(output) # 14 x 14
print(output.shape) # (?, 1024, 4, 72, 64)
generator_out = DeconvolutionalLayer(1,
kernel_size=5,
stride=2,
acti_func='sigmoid',
name='Generator.Output')
output = generator_out(output, is_training=True)
#output = tflib.ops.deconv2d.Deconv2D('Generator.Output',
# self.latent_dim, 1, 5, output)
#output = tf.nn.sigmoid(output) # 28 x 28
if self.gen_params is None:
self.gen_params = tflib.params_with_name('Generator')
print(output.shape) # (?, 2048, 8, 144, 1)
print("Should be %s" % str(self.x_dim)) # [1, 19, 144, 144, 4]
return tf.reshape(output, self.x_dim)
我不太确定如何将 19 放入其中。目前我收到此错误。
ValueError: Dimension size must be evenly divisible by 2359296 but is 1575936 for 'Reshape_1' (op: 'Reshape') with input shapes: [?,2048,8,144,1], [5] and with input tensors computed as partial shapes: input1 = [1,19,144,144,4].
我对构建神经网络也比较陌生,我也有一些问题。当我们在 z 空间中已经有了紧凑的表示时,潜在空间的意义何在?如何确定“输出维度”的大小,即层构造函数中的第二个参数?
我也一直在关注使用 here 成功实现 CNN寻找灵感。谢谢!
主要编辑:
我取得了一些进展并获得了 tensorflow 来运行代码。但是,即使批处理大小为 1,我在尝试运行训练操作时也会遇到内存不足错误。我计算出一张图像的大小为 19 * 144 * 144 * 4 * 32(每像素位数)= ~50 MB,因此导致内存错误的不是数据。因为我基本上只是调整 GAN 参数直到它起作用,所以我的问题可能就在那里。以下是整个文件。
class MnistWganInv(object):
def __init__(self, x_dim=784, z_dim=64, latent_dim=64, batch_size=80,
c_gp_x=10., lamda=0.1, output_path='./'):
self.x_dim = [-1] + x_dim[1:]
self.z_dim = z_dim
self.latent_dim = latent_dim
self.batch_size = batch_size
self.c_gp_x = c_gp_x
self.lamda = lamda
self.output_path = output_path
self.gen_params = self.dis_params = self.inv_params = None
self.z = tf.placeholder(tf.float32, shape=[None, self.z_dim])
self.x_p = self.generate(self.z)
self.x = tf.placeholder(tf.float32, shape=x_dim)
self.z_p = self.invert(self.x)
self.dis_x = self.discriminate(self.x)
self.dis_x_p = self.discriminate(self.x_p)
self.rec_x = self.generate(self.z_p)
self.rec_z = self.invert(self.x_p)
self.gen_cost = -tf.reduce_mean(self.dis_x_p)
self.inv_cost = tf.reduce_mean(tf.square(self.x - self.rec_x))
self.inv_cost += self.lamda * tf.reduce_mean(tf.square(self.z - self.rec_z))
self.dis_cost = tf.reduce_mean(self.dis_x_p) - tf.reduce_mean(self.dis_x)
alpha = tf.random_uniform(shape=[self.batch_size, 1], minval=0., maxval=1.)
difference = self.x_p - self.x
interpolate = self.x + alpha * difference
gradient = tf.gradients(self.discriminate(interpolate), [interpolate])[0]
slope = tf.sqrt(tf.reduce_sum(tf.square(gradient), axis=1))
gradient_penalty = tf.reduce_mean((slope - 1.) ** 2)
self.dis_cost += self.c_gp_x * gradient_penalty
self.gen_params = tf.get_collection(tf.GraphKeys.GLOBAL_VARIABLES, scope='Generator')
self.inv_params = tf.get_collection(tf.GraphKeys.GLOBAL_VARIABLES, scope='Inverter')
self.dis_params = tf.get_collection(tf.GraphKeys.GLOBAL_VARIABLES, scope='Discriminator')
self.gen_train_op = tf.train.AdamOptimizer(
learning_rate=1e-4, beta1=0.9, beta2=0.999).minimize(
self.gen_cost, var_list=self.gen_params)
self.inv_train_op = tf.train.AdamOptimizer(
learning_rate=1e-4, beta1=0.9, beta2=0.999).minimize(
self.inv_cost, var_list=self.inv_params)
self.dis_train_op = tf.train.AdamOptimizer(
learning_rate=1e-4, beta1=0.9, beta2=0.999).minimize(
self.dis_cost, var_list=self.dis_params)
def generate(self, z):
print(z.shape)
assert z.shape[1] == self.z_dim
with tf.name_scope('Generator.Input') as scope:
generator_input = FullyConnectedLayer(self.latent_dim * 4 * 3 * 18 * 18,
acti_func='relu',
#with_bn = True,
name='Generator.Input')(z, is_training=True)
print(generator_input.shape)
#output = tflib.ops.linear.Linear('Generator.Input', self.z_dim,
# self.latent_dim * 64, z)
#output = tf.nn.relu(output)
generator_input = tf.reshape(generator_input, [-1, 3, 18, 18, self.latent_dim * 4]) # 4 x 4
print(generator_input.shape)
with tf.name_scope('Generator.2') as scope:
generator_2 = DeconvolutionalLayer(self.latent_dim*2,
kernel_size=5,
stride=2,
acti_func='relu',
name='Generator.2')(generator_input, is_training=True)
#output = tflib.ops.deconv2d.Deconv2D('Generator.2', self.latent_dim * 4,
# self.latent_dim * 2, 5, output)
#output = tf.nn.relu(output) # 8 x 8
print(generator_2.shape)
with tf.name_scope('Generator.3') as scope:
generator_3 = DeconvolutionalLayer(self.latent_dim,
kernel_size=5,
stride=2,
acti_func='relu',
name='Generator.3')(generator_2, is_training=True)
#output = tflib.ops.deconv2d.Deconv2D('Generator.3', self.latent_dim * 2,
# self.latent_dim, 5, output)
#output = tf.nn.relu(output) # 14 x 14
print(generator_3.shape)
with tf.name_scope('Generator.Output') as scope:
generator_out = DeconvolutionalLayer(4,
kernel_size=5,
stride=2,
acti_func='sigmoid',
name='Generator.Output')(generator_3, is_training=True)
#output = tflib.ops.deconv2d.Deconv2D('Generator.Output',
# self.latent_dim, 1, 5, output)
#output = tf.nn.sigmoid(output) # 28 x 28
if self.gen_params is None:
self.gen_params = tflib.params_with_name('Generator')
print(generator_out.shape)
generator_out = generator_out[:, :19, :, :, :]
print(generator_out.shape)
print("Should be %s" % str(self.x_dim))
return tf.reshape(generator_out, self.x_dim)
def discriminate(self, x):
input = tf.reshape(x, self.x_dim) # 28 x 28
with tf.name_scope('Discriminator.Input') as scope:
discriminator_input = ConvolutionalLayer(self.latent_dim,
kernel_size=5,
stride=2,
acti_func='leakyrelu',
name='Discriminator.Input')(input, is_training=True)
#output = tflib.ops.conv2d.Conv2D(
# 'Discriminator.Input', 1, self.latent_dim, 5, output, stride=2)
#output = tf.nn.leaky_relu(output) # 14 x 14
with tf.name_scope('Discriminator.2') as scope:
discriminator_2 = ConvolutionalLayer(self.latent_dim*2,
kernel_size=5,
stride=2,
acti_func='leakyrelu',
name='Discriminator.2')(discriminator_input, is_training=True)
#output = tflib.ops.conv2d.Conv2D(
# 'Discriminator.2', self.latent_dim, self.latent_dim * 2, 5,
# output, stride=2)
#output = tf.nn.leaky_relu(output) # 7 x 7
with tf.name_scope('Discriminator.3') as scope:
discriminator_3 = ConvolutionalLayer(self.latent_dim*4,
kernel_size=5,
stride=2,
acti_func='leakyrelu',
name='Discriminator.3')(discriminator_2, is_training=True)
#output = tflib.ops.conv2d.Conv2D(
# 'Discriminator.3', self.latent_dim * 2, self.latent_dim * 4, 5,
# output, stride=2)
#output = tf.nn.leaky_relu(output) # 4 x 4
discriminator_3 = tf.reshape(discriminator_3, [-1, self.latent_dim * 48])
with tf.name_scope('Discriminator.Output') as scope:
discriminator_out = FullyConnectedLayer(1,
name='Discriminator.Output')(discriminator_3, is_training=True)
#output = tflib.ops.linear.Linear(
# 'Discriminator.Output', self.latent_dim * 64, 1, output)
discriminator_out = tf.reshape(discriminator_out, [-1])
if self.dis_params is None:
self.dis_params = tflib.params_with_name('Discriminator')
return discriminator_out
def invert(self, x):
output = tf.reshape(x, self.x_dim) # 28 x 28
with tf.name_scope('Inverter.Input') as scope:
inverter_input = ConvolutionalLayer(self.latent_dim,
kernel_size=5,
stride=2,
#padding='VALID',
#w_initializer=self.initializers['w'],
#w_regularizer=self.regularizers['w'],
#b_initializer=self.initializers['b'],
#b_regularizer=self.regularizers['b'],
acti_func='leakyrelu',
#with_bn = True,
name='Inverter.Input')
#output = tflib.ops.conv2d.Conv2D(
# 'Inverter.Input', 1, self.latent_dim, 5, output, stride=2)
#output = tf.nn.leaky_relu(output) # 14 x 14
output = inverter_input(output, is_training=True)
with tf.name_scope('Inverter.2') as scope:
inverter_2 = ConvolutionalLayer(self.latent_dim*2,
kernel_size=5,
stride=2,
acti_func='leakyrelu',
name='Inverter.2')
output = inverter_2(output, is_training=True)
#output = tflib.ops.conv2d.Conv2D(
# 'Inverter.2', self.latent_dim, self.latent_dim * 2, 5, output,
# stride=2)
#output = tf.nn.leaky_relu(output) # 7 x 7
with tf.name_scope('Inverter.3') as scope:
inverter_3 = ConvolutionalLayer(self.latent_dim*4,
kernel_size=5,
stride=2,
acti_func='leakyrelu',
name='Inverter.3')
output = inverter_3(output, is_training=True)
#output = tflib.ops.conv2d.Conv2D(
# 'Inverter.3', self.latent_dim * 2, self.latent_dim * 4, 5,
# output, stride=2)
#output = tf.nn.leaky_relu(output) # 4 x 4
output = tf.reshape(output, [-1, self.latent_dim * 48])
with tf.name_scope('Inverter.4') as scope:
inverter_4 = FullyConnectedLayer(self.latent_dim*8,
acti_func='leakyrelu',
#with_bn = True,
name='Inverter.4')
output = inverter_4(output, is_training=True)
#output = tflib.ops.linear.Linear(
# 'Inverter.4', self.latent_dim * 64, self.latent_dim * 8, output)
#output = tf.nn.leaky_relu(output)
with tf.name_scope('Inverter.Output') as scope:
inverter_output = FullyConnectedLayer(self.z_dim,
acti_func='leakyrelu',
#with_bn = True,
name='Inverter.Output')
output = inverter_output(output, is_training=True)
#output = tflib.ops.linear.Linear(
# 'Inverter.Output', self.latent_dim * 8, self.z_dim, output)
output = tf.reshape(output, [-1, self.z_dim])
if self.inv_params is None:
self.inv_params = tflib.params_with_name('Inverter')
return output
def train_gen(self, sess, x, z):
_gen_cost, _ = sess.run([self.gen_cost, self.gen_train_op],
feed_dict={self.x: x, self.z: z})
return _gen_cost
def train_dis(self, sess, x, z):
_dis_cost, _ = sess.run([self.dis_cost, self.dis_train_op],
feed_dict={self.x: x, self.z: z})
return _dis_cost
def train_inv(self, sess, x, z):
_inv_cost, _ = sess.run([self.inv_cost, self.inv_train_op],
feed_dict={self.x: x, self.z: z})
return _inv_cost
def generate_from_noise(self, sess, noise, frame):
samples = sess.run(self.x_p, feed_dict={self.z: noise})
for i in range(batch_size):
save_array_as_nifty_volume(samples[i], "examples/img_{0:}.nii.gz".format(n*batch_size + i))
#tflib.save_images.save_images(
# samples.reshape((-1, 28, 28)),
# os.path.join(self.output_path, 'examples/samples_{}.png'.format(frame)))
return samples
def reconstruct_images(self, sess, images, frame):
reconstructions = sess.run(self.rec_x, feed_dict={self.x: images})
comparison = np.zeros((images.shape[0] * 2, images.shape[1]),
dtype=np.float32)
for i in range(images.shape[0]):
comparison[2 * i] = images[i]
comparison[2 * i + 1] = reconstructions[i]
for i in range(batch_size):
save_array_as_nifty_volume(comparison[i], "examples/img_{0:}.nii.gz".format(n*batch_size + i))
#tflib.save_images.save_images(
# comparison.reshape((-1, 28, 28)),
# os.path.join(self.output_path, 'examples/recs_{}.png'.format(frame)))
return comparison
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--z_dim', type=int, default=64, help='dimension of z')
parser.add_argument('--latent_dim', type=int, default=64,
help='latent dimension')
parser.add_argument('--iterations', type=int, default=100000,
help='training steps')
parser.add_argument('--dis_iter', type=int, default=5,
help='discriminator steps')
parser.add_argument('--c_gp_x', type=float, default=10.,
help='coefficient for gradient penalty x')
parser.add_argument('--lamda', type=float, default=.1,
help='coefficient for divergence of z')
parser.add_argument('--output_path', type=str, default='./',
help='output path')
parser.add_argument('-config')
args = parser.parse_args()
config = parse_config(args.config)
config_data = config['data']
print("Loading data...")
# dataset iterator
dataloader = DataLoader(config_data)
dataloader.load_data()
batch_size = config_data['batch_size']
full_data_shape = [batch_size] + config_data['data_shape']
#train_gen, dev_gen, test_gen = tflib.mnist.load(args.batch_size, args.batch_size)
def inf_train_gen():
while True:
train_pair = dataloader.get_subimage_batch()
tempx = train_pair['images']
tempw = train_pair['weights']
tempy = train_pair['labels']
yield tempx, tempw, tempy
#_, _, test_data = tflib.mnist.load_data()
#fixed_images = test_data[0][:32]
#del test_data
tf.set_random_seed(326)
np.random.seed(326)
fixed_noise = np.random.randn(64, args.z_dim)
print("Initializing GAN...")
mnistWganInv = MnistWganInv(
x_dim=full_data_shape, z_dim=args.z_dim, latent_dim=args.latent_dim,
batch_size=batch_size, c_gp_x=args.c_gp_x, lamda=args.lamda,
output_path=args.output_path)
saver = tf.train.Saver(max_to_keep=1000)
with tf.Session() as session:
session.run(tf.global_variables_initializer())
images = noise = gen_cost = dis_cost = inv_cost = None
dis_cost_lst, inv_cost_lst = [], []
print("Starting training...")
for iteration in range(args.iterations):
for i in range(args.dis_iter):
noise = np.random.randn(batch_size, args.z_dim)
images, images_w, images_y = next(inf_train_gen())
dis_cost_lst += [mnistWganInv.train_dis(session, images, noise)]
inv_cost_lst += [mnistWganInv.train_inv(session, images, noise)]
gen_cost = mnistWganInv.train_gen(session, images, noise)
dis_cost = np.mean(dis_cost_lst)
inv_cost = np.mean(inv_cost_lst)
tflib.plot.plot('train gen cost', gen_cost)
tflib.plot.plot('train dis cost', dis_cost)
tflib.plot.plot('train inv cost', inv_cost)
if iteration % 100 == 99:
mnistWganInv.generate_from_noise(session, fixed_noise, iteration)
mnistWganInv.reconstruct_images(session, fixed_images, iteration)
if iteration % 1000 == 999:
save_path = saver.save(session, os.path.join(
args.output_path, 'models/model'), global_step=iteration)
if iteration % 1000 == 999:
dev_dis_cost_lst, dev_inv_cost_lst = [], []
for dev_images, _ in dev_gen():
noise = np.random.randn(batch_size, args.z_dim)
dev_dis_cost, dev_inv_cost = session.run(
[mnistWganInv.dis_cost, mnistWganInv.inv_cost],
feed_dict={mnistWganInv.x: dev_images,
mnistWganInv.z: noise})
dev_dis_cost_lst += [dev_dis_cost]
dev_inv_cost_lst += [dev_inv_cost]
tflib.plot.plot('dev dis cost', np.mean(dev_dis_cost_lst))
tflib.plot.plot('dev inv cost', np.mean(dev_inv_cost_lst))
if iteration < 5 or iteration % 100 == 99:
tflib.plot.flush(os.path.join(args.output_path, 'models'))
tflib.plot.tick()
最佳答案
您可能正在尝试优化比您的机器在内存中可以处理的更多参数。您在减少批量大小方面走在正确的轨道上,但无论好坏,这可能不是您做错的事情。
每个卷积层都有基于内核宽度、输入层和输出层的参数。这是一篇描述 CNN 维度分析的文章:https://towardsdatascience.com/understanding-and-calculating-the-number-of-parameters-in-convolution-neural-networks-cnns-fc88790d530d
然而,当您展平所有内容并开始使用全连接层时,可能会给您带来很多麻烦的是您必须优化的额外参数的数量。当前向量中的每个值都会获得另一个参数,以针对您在全连接层中使用的每个节点数进行优化。
如果您的初始图像向量非常大(在您的情况下),您将在全连接层中得到很多参数。看起来您正在使用 > 1 的步幅,因此维度会减少很多。但是,就您目前的问题而言,可能需要一些重型硬件才能解决。
一个想法是尝试通过在池化时增加步长来减少输入图像的维数或内部表示的维数。
关于python - 更改 CNN 以使用 3D 卷积,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56973340/
关闭。这个问题需要debugging details .它目前不接受答案。 编辑问题以包含 desired behavior, a specific problem or error, and th
我试图用这种形式简单地获取数字 28 integer+space+integer+integer+space+integer我试过这个正则表达式 \\s\\d\\d\\s 但我得到了两个数字11 和
最近一直在学习D语言。我一直对运行时感到困惑。 从我能收集到的关于它的信息中,(这不是很多)我知道它是一种有助于 D 的一些特性的运行时。像垃圾收集一样,它与您自己的程序一起运行。但是既然 D 是编译
想问一下这两个正则表达式有区别吗? \d\d\d 与 \d{3} 我已经在我的本地机器上使用 Java 和 Windows 操作系统对此进行了测试,两者都工作正常并且结果相同。但是,当在 linux
我正在学习 Go,而且我坚持使用 Go 之旅(exercise-stringer.go:https://tour.golang.org/methods/7)。 这是一些代码: type IPAddr
我在Java正则表达式中发现了一段令我困惑的代码: Pattern.compile( "J.*\\d[0-35-9]-\\d\\d-\\d\\d" ); 要编译的字符串是: String string
我在 ruby 代码上偶然发现了这个。我知道\d{4})\/(\d\d)\/(\d\d)\/(.*)/是什么意思,但是\1-\2-\3-\4 是什么意思? 最佳答案 \1-\2-\3-\4 是 b
我一直在努力解决这个问题,这让我很恼火。我了解 D 运行时库。它是什么,它做什么。我也明白你可以在没有它的情况下编译 D 应用程序。就像 XoMB 所做的那样。好吧,XoMB 定义了自己的运行时,但是
我有两个列表列表,子列表代表路径。我想找到所有路径。 List> pathList1 List> pathList2 当然是天真的解决方案: List> result = new ArrayList>
我需要使用 Regex 格式化一个字符串,该字符串包含数字、字母 a-z 和 A-Z,同时还包含破折号和空格。 从用户输入我有02-219 8 53 24 输出应该是022 198 53 24 我正在
目标是达到与this C++ example相同的效果: 避免创建临时文件。我曾尝试将 C++ 示例翻译为 D,但没有成功。我也尝试过不同的方法。 import std.datetime : benc
tl;dr:你好吗perfect forwarding在 D? 该链接有一个很好的解释,但例如,假设我有这个方法: void foo(T)(in int a, out int b, ref int c
有什么方法可以在 D 中使用abstract auto 函数吗? 如果我声明一个类如下: class MyClass { abstract auto foo(); } 我收到以下错误: mai
有没有人为内存中重叠的数组切片实现交集?算法在没有重叠时返回 []。 当 pretty-print (使用重叠缩进)内存中重叠的数组切片时,我想要这个。 最佳答案 如果您确定它们是数组,那么只需取 p
我已经开始学习 D,但我在使用 Andrei Alexandrescu 所著的 The D Programming Language 一书中提供的示例时遇到了一些麻烦。由于 int 和 ulong 类
如何创建一个不可变的类? 我的目标是创建一个实例始终不可变的类。现在我只是用不可变的方法和构造函数创建了一个“可变”类。我将其称为 mData,m 表示可变。然后我创建一个别名 alias immut
不久前我买了《The D Programming Language》。好书,很有教育意义。但是,我在尝试编译书中列出的语言功能时遇到了麻烦:扩展函数。 在这本书中,Andrei 写了任何可以像这样调用
我在 D http://www.digitalmars.com/d/2.0/lazy-evaluation.html 中找到了函数参数的惰性求值示例 我想知道如何在 D 中实现可能的无限数据结构,就像
这个问题在这里已经有了答案: 12 年前关闭。 Possible Duplicate: Could anyone explain these undefined behaviors (i = i++
当前是否可以跨模块扫描/查询/迭代具有某些属性的所有函数(或类)? 例如: source/packageA/something.d: @sillyWalk(10) void doSomething()
我是一名优秀的程序员,十分优秀!