code: def test_data_resize():
      batch_size = 8
      w = C.parameter(shape=(3, 2), name="w1")
      x = C.input_variable(shape=[3], name="x")
      y = C.softmax(C.times(x, w))
      y = C.unpack_batch(y)
      y = C.reshape(y, [batch_size * 2])
      loss = C.reduce_mean(-C.log(y))
  
      learning_rate = 0.01
      lr_schedule = C.learning_rate_schedule(
          learning_rate, C.UnitType.minibatch
      )
      learner = C.sgd(
          y.parameters,
          lr_schedule,
          gradient_clipping_threshold_per_sample=1.0,
      )
      trainer = C.Trainer(y, (loss), [learner])
  
      features = np.random.randn(batch_size, 3)
      trainer.train_minibatch({x: features})
  
imports: from __future__ import division
  import numpy
  import cntk
  import pytest
  from .ops_test_utils import unittest_helper, _test_unary_op, _test_binary_op, AA, precision, PRECISION_TO_TYPE, cntk_device
  import cntk
  from cntk import Value
  from cntk.axis import Axis
  from cntk.internal import sanitize_dtype_cntk
  from ..None import constant
label_desc: Use image node_id 24 for calling a global function with example usage: test_data_resize() without return types